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

session_gc

Description

The session_gc of Session for PHP performs the session data garbage collection.

Syntax

session_gc(): int|false

Return

Returns number of deleted session data for success, false for failure.

Old save handlers do not return number of deleted session data, but only success/failure flag. If this is the case, number of deleted session data became 1 regardless of actually deleted data.

Examples

1 · void

<?

session_start();

$return = session_gc();

echo $return;
10