session_get_cookie_params
Description
The session_get_cookie_params of Session for PHP gets the session cookie parameters.
Syntax
session_get_cookie_params(): array
Return
Returns an array with the current session cookie information:
Key | Description |
---|---|
lifetime | The lifetime of the cookie in seconds. |
path | The path where information is stored. |
domain | The domain of the cookie. |
secure | The cookie should only be sent over secure connections. |
httponly | The cookie can only be accessed through the HTTP protocol. |
samesite | Controls the cross-domain sending of the cookie. |
Examples
1 · void
<? $return = session_get_cookie_params(); print_r($return);
Array ( [lifetime] => 0 [path] => / [domain] => [secure] => [httponly] => [samesite] => )
Links
Related
Session
- session_abort
- session_cache_expire
- session_cache_limiter
- session_commit
- session_create_id
- session_decode
- session_destroy
- session_encode
- session_gc
- session_id
- session_module_name
- session_name
- session_regenerate_id
- session_register_shutdown
- session_reset
- session_save_path
- session_set_cookie_params
- session_set_save_handler
- session_start
- session_status
- session_unset
- session_write_close