ID: 33928
User updated by: bolk at hitv dot ru
Reported By: bolk at hitv dot ru
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux Fedora Core 4
PHP Version: 5.0.4
New Comment:
new PHP motto: it isn't a bug 'coz no one needs it working right
anyways
Previous Comments:
------------------------------------------------------------------------
[2005-07-30 15:12:43] [EMAIL PROTECTED]
I can also shoot myself in my leg but I don't do that since it would be
stupid..
------------------------------------------------------------------------
[2005-07-30 10:44:49] bolk at hitv dot ru
But this example prints full GLOBALS:
<?
$a = array_merge(array(), $GLOBALS);
$a['GLOBALS'] = 2;
$GLOBALS = $a;
print_r($GLOBALS['GLOBALS']);
?>
There is an inconsistency between the two behaviours
------------------------------------------------------------------------
[2005-07-30 10:16:26] bolk at hitv dot ru
Description:
------------
I can broke 'GLOBALS' array and 'GLOBALS' items doesn't equal 'GLOBALS'
var.
Reproduce code:
---------------
<?
$a = unserialize(serialize($GLOBALS));
$a['GLOBALS'] = 2;
$GLOBALS = $a;
print_r($GLOBALS['GLOBALS']);
?>
Expected result:
----------------
Array
(
[GLOBALS] => Array
*RECURSION*
et cetera
Actual result:
--------------
2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33928&edit=1