cvs: phpdoc /en/appendices reserved.xml

From: Date: Tue, 12 Mar 2002 23:33:22 +0000
Subject: cvs: phpdoc /en/appendices reserved.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969343000@lists.php.net to get a copy of this message
torben Tue Mar 12 18:33:22 2002 EDT Modified files: /phpdoc/en/appendices reserved.xml Log: Re-added Andrew's note about $PHP_SELF. Added $GLOBALS to the list of predefined variables. Index: phpdoc/en/appendices/reserved.xml diff -u phpdoc/en/appendices/reserved.xml:1.16 phpdoc/en/appendices/reserved.xml:1.17 --- phpdoc/en/appendices/reserved.xml:1.16 Tue Mar 12 18:14:33 2002 +++ phpdoc/en/appendices/reserved.xml Tue Mar 12 18:33:21 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- Note: Please do not link or translate this file yet. This is only an initial update, quite a few more commits will @@ -269,8 +269,14 @@ <listitem> <simpara> The filename of the currently executing script, relative to - the document root. If PHP is running as a command-line - processor, this variable is not available. + the document root. For instance, + <varname>$_SERVER['PHP_SELF']</varname> in a script at the + address <filename>http://test.com/test.php/foo.bar</filename> + would be <filename>/test.php/foo.bar</filename>. + </simpara> + <simpara> + If PHP is running as a command-line processor, this variable + is not available. </simpara> </listitem> </varlistentry> @@ -841,6 +847,30 @@ <link linkend="security.registerglobals">Using Register Globals</link>. These individual globals are not autoglobals. </simpara> + </sect2> + + <sect2 id="reserved.variables.globals"> + <title>Global variables: <varname>$GLOBALS</varname></title> + + <note> + <simpara> + <varname>$GLOBALS</varname> has been available since PHP 3.0.0. + </simpara> + </note> + + <simpara> + An associative array containing references to all variables which + are currently defined in the global scope of the script. The + variable names are the keys of the array. + </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 + $GLOBALS;</command> to access it within functions or methods. + </simpara> + </sect2> <sect2 id="reserved.variables.phperrormsg">

« previous php.doc (#969343000) next »