_SESSION(3) 1 _SESSION(3)
$_SESSION - Session variables
An associative array containing session variables available to the current script. See the Session functions documentation for more infor-
mation on how this is used.
$HTTP_SESSION_VARS contains the same initial information, but is not a superglobal. (Note that $HTTP_SESSION_VARS and $_SESSION are differ-
ent variables and that PHP handles them as such)
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 4.1.0 | |
| | |
| | Introduced $_SESSION that deprecated $HTTP_SES- |
| | SION_VARS. |
| | |
+--------+---------------------------------------------------+
Note
This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script.
There is no need to do global $variable; to access it within functions or methods.
session_start(3).
PHP Documentation Group _SESSION(3)