From 2a8588bf1b915bd81f903d766567dace6d3f76e0 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Tue, 12 Mar 2002 23:12:28 +0000 Subject: [PATCH] Added a warning about the register_globals change; added $GLOBALS. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@73028 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/variables.xml | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/language/variables.xml b/language/variables.xml index cefca9f2e7..9758a7d0a7 100644 --- a/language/variables.xml +++ b/language/variables.xml @@ -1,5 +1,5 @@ - + Variables @@ -121,6 +121,28 @@ $bar = &test(); // Invalid. Predefined variables. + + + 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 by defaultno + longer placed directly into the global scope; rather, they are + placed into the following superglobal + arrays. + + + You can still force the old behaviour by setting register_globals to 'On' in + your php.ini file. + + + For more information and background on this change, please see + the PHP 4.1.0 Release + Announcement. + + + 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 @@ $bar = &test(); // Invalid. Predefined variables. - + PHP Superglobals + + $GLOBALS + + + 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. + + + $_SERVER