torben Thu Feb 14 15:27:10 2002 EDT
Modified files:
/phpdoc/en/appendices predefined.xml
Log:
Added $_SESSION.
Index: phpdoc/en/appendices/predefined.xml
diff -u phpdoc/en/appendices/predefined.xml:1.4 phpdoc/en/appendices/predefined.xml:1.5
--- phpdoc/en/appendices/predefined.xml:1.4 Thu Feb 14 07:15:33 2002
+++ phpdoc/en/appendices/predefined.xml Thu Feb 14 15:27:09 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- Note: Please do not link or translate this file yet.
This is only an initial update, quite a few more commits will
@@ -604,6 +604,48 @@
the security chapter titled <link
linkend="security.registerglobals">Using Register
Globals</link>. These individual globals are not autoglobals.
+ </simpara>
+ </sect2>
+
+ <sect2 id="predefined.variables.session">
+ <title>Session variables: <varname>$_SESSION</varname></title>
+
+ <note>
+ <simpara>
+ Introduced in 4.1.0. In earlier versions, use
+ <varname>$HTTP_SESSION_VARS</varname>.
+ </simpara>
+ </note>
+
+ <simpara>
+ An associative array containing session variables available to
+ the current script. See the <link linkend="ref.session">Session
+ functions</link> documentation for more information on how this
+ is used.
+ </simpara>
+
+ <simpara>
+ This is a 'superglobal', or automatic global, variable. This
+ simply means that it is available in all scopes throughout a
+ script. You don't need to do a <command>global
+ $_SESSION;</command> to access it within functions or methods, as
+ you do with <varname>$HTTP_SESSION_VARS</varname>.
+ </simpara>
+
+ <simpara>
+ <varname>$HTTP_SESSION_VARS</varname> contains the same
+ information, but is not an autoglobal.
+ </simpara>
+
+ <simpara>
+ If the <link
+ linkend="ini.register-globals">register_globals</link> directive
+ is set, then these variables will also be made available in the
+ global scope of the script; i.e., separate from the
+ <varname>$_SESSION</varname> and <varname>$HTTP_SESSION_VARS</varname>
+ arrays. For related information, see the security chapter titled
+ <link linkend="security.registerglobals">Using Register
+ Globals</link>. These individual globals are not autoglobals.
</simpara>
</sect2>