session_encode
(PHP 4, PHP 5, PHP 7, PHP 8)
session_encode — Encodes the current session data as a session encoded string
Parameters
This function has no parameters.
Return Values
Returns the contents of the current session encoded, or false on failure.
Returns false if no session has been started, if the session has been
destroyed with session_destroy(), if
$_SESSION has been set to a value that is not an
array, or if
session.serialize_handler
is php and a key of $_SESSION contains
the | character. Prior to PHP 8.6.0, it also returns
false if the handler is php or
php_binary and $_SESSION contains no
entry that can be encoded, for example when it is empty or has only
numeric keys.