HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

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