cvs: phpdoc /en/language variables.xml

From: Date: Tue, 12 Mar 2002 23:12:28 +0000
Subject: cvs: phpdoc /en/language variables.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969342998@lists.php.net to get a copy of this message
torben Tue Mar 12 18:12:28 2002 EDT Modified files: /phpdoc/en/language variables.xml Log: Added a warning about the register_globals change; added $GLOBALS. Index: phpdoc/en/language/variables.xml diff -u phpdoc/en/language/variables.xml:1.38 phpdoc/en/language/variables.xml:1.39 --- phpdoc/en/language/variables.xml:1.38 Mon Mar 11 21:05:59 2002 +++ phpdoc/en/language/variables.xml Tue Mar 12 18:12:28 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.38 $ --> +<!-- $Revision: 1.39 $ --> <chapter id="language.variables"> <title>Variables</title> @@ -121,6 +121,28 @@ <link linkend="reserved.variables">Predefined variables</link>. </simpara> + <warning> + <simpara> + In PHP 4.1.0 and later, the default set of predefined variables + which are available in the global scope has changed. Individual + input and server variables are <emphasis>by default</emphasis>no + longer placed directly into the global scope; rather, they are + placed into the following <link + linkend="language.variables.superglobals">superglobal + arrays</link>. + </simpara> + <simpara> + You can still force the old behaviour by setting <link + linkend="ini.register-globals">register_globals</link> to 'On' in + your <filename>php.ini</filename> file. + </simpara> + <simpara> + For more information and background on this change, please see + the <ulink url="&url.php.release4.1.0;">PHP 4.1.0 Release + Announcement</ulink>. + </simpara> + </warning> + <simpara> From version 4.1.0 onward, PHP provides a set of predefined arrays containing variables from the web server (if applicable), the @@ -134,8 +156,18 @@ <link linkend="reserved.variables">Predefined variables</link>. </simpara> - <variablelist> + <variablelist id="language.variables.superglobals"> <title>PHP Superglobals</title> + <varlistentry> + <term><link linkend="reserved.variables.globals">$GLOBALS</link></term> + <listitem> + <simpara> + Contains a reference to every variable which is currently + available within the global scope of the script. The keys of + this array are the names of the global variables. + </simpara> + </listitem> + </varlistentry> <varlistentry> <term><link linkend="reserved.variables.server">$_SERVER</link></term> <listitem>

« previous php.doc (#969342998) next »