PHP 4.0 Bug #2218: GLOBALS Array is not the same as PHP3
| From: | brianlmoon at iname dot com | Date: | Thu, 02 Sep 1999 15:42:02 +0000 |
| Subject: | PHP 4.0 Bug #2218: GLOBALS Array is not the same as PHP3 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10453@lists.php.net to get a copy of this message | ||
From: brianlmoon@iname.com
Operating system: Sloaris 2.6
PHP version: 4.0 Beta 2
PHP Bug Type: Other
Bug description: GLOBALS Array is not the same as PHP3
Under PHP3 this script:
$count = count($GLOBALS);
echo "There are $count global variables<br>\n";
$thiskey = key($GLOBALS);
$data = current( $GLOBALS );
$i=0;
while($i<$count){
echo "$thiskey = $data<br>\n";
$data = next($GLOBALS);
$thiskey = key($GLOBALS);
$i++;
}
produces a large page of variable and their values. Some of which are PHP_SELF REMOTE_HOST
HTTP_HOST, etc.
in PHP4 beta 2 in both CGI and Module usage the same script returns:
There are 1 global variables
HTTP_GET_VARS = Array