Re: $GLOBALS example script on php.net

From: Date: Sun, 06 Mar 2011 15:11:13 +0000
Subject: Re: $GLOBALS example script on php.net
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-311714@lists.php.net to get a copy of this message
It doesn't though, it creates a copy of the $_GLOBALS super global array, removes entries that will have been set by the system (i.e. it leaves user-defined variables) and then returns the ones that are left, so in that, the user note is perfectly correct. What has me puzzled is how unsetting LEAVES user defined variables ? Why would that happen ? The array in the function lists the common server-defined variables > (HTTP_VARS, etc), which it unsets from the local copy of the super global > array ($globals). Basically, it loops through the un-named array, and unsets > that index from $globals. > Thank you, Ashim

« previous php.general (#311714) next »