session_reset
Description
The session_reset of Session for PHP re-initializes the session array with original values.
Syntax
session_reset(): bool
Return
Returns true on success or false on failure.
Examples
1 · void
<? session_start(); $_SESSION["mykey"] = "myvalue"; echo $_SESSION["mykey"] . PHP_EOL; $return = session_reset(); var_export($return); echo PHP_EOL; var_export($_SESSION["mykey"]); ?>
myvalue true NULL
Links
Session
- session_abort
- session_cache_expire
- 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_save_path
- session_set_cookie_params
- session_set_save_handler
- session_start
- session_status
- session_unset
- session_write_close