session_unset
session_unset
Free all session variables
bool **session_unset**
The function frees all session variables
currently registered.
session_unset
return.success
Opmerking: > If is used, use to unregister a session variable, i.e. .
$_SESSION``unset``unset($_SESSION['varname']);
Let op: > Do NOT unset the whole with as this will disable the registering of session variables through the superglobal.
$_SESSION``unset($_SESSION)``$_SESSION
Opmerking: > The use of is identical to .
session_unset``$_SESSION = []
Let op: > This function works only if a session is active. It will not clear the array if the session has not been started yet or has already been destroyed. Use to unset all session variables even if the session is not active.
$_SESSION``$_SESSION = []