session_cache_expire
Description
The session_cache_expire of Session for PHP gets and/or sets the current cache expire.
Syntax
session_cache_expire( ?int $value = null ): int|false
Parameters
value
If value is given and not null, the current cache expire is replaced with value.
NOTE: Setting value is of value only, if session.cache_limiter is set to a value different from nocache.
Return
Returns the current setting of session.cache_expire. The value returned should be read in minutes, defaults to 180. On failure to change the value, false is returned.
Examples
1 · void
<? $return = session_cache_expire(); echo $return;
180
2 · value · previous
<? $value = 60; $return = session_cache_expire($value); echo $return;
180
3 · value · current
<? $value = 60; session_cache_expire($value); $return = session_cache_expire(); echo $return;
60
Links
Related
Session
- session_abort
- session_cache_limiter
- session_commit
- session_create_id
- session_decode
- session_destroy
- session_encode
- session_gc
- session_get_cookie_params
- 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