php8.5
Home/ Manual/ session / functions/ session_reset

session_reset

PHP function Edit on GitHub ✎

(PHP 5 >= 5.6.0, PHP 7, PHP 8)

Re-initialize session array with original values

Description

session_reset(): bool

session_reset() reinitializes a session with original values stored in session storage. This function requires an active session and discards changes in $_SESSION.

Parameters Parameters

Return Values

Success

Changelog

VersionDescription
7.2.0The return type of this function is bool now. Formerly, it has been void.

See Also

Source: reference/session/functions/session-reset.xml · from the official PHP manual (php/doc-en)