php-src/Zend/tests/bug71695.phpt
Xinchen Hui 186844be92 Fixed bug #71695 (Global variables are reserved before execution).
Instead of slow down hash_merge, we may also check the array(whether it
contains INDIRECT) outside of the loop, however, consisdering hash_merge
is not widly used, I prefer fix this in the current way to keep the
codes simple
2016-03-01 19:19:07 +08:00

18 lines
303 B
PHP

--TEST--
Bug #71695 (Global variables are reserved before execution)
--FILE--
<?php
function provideGlobals() {
var_dump(array_key_exists("foo", $GLOBALS));
var_dump(isset($GLOBALS["foo"]));
$GLOBALS += array("foo" => "foo");
}
provideGlobals();
echo $foo;
?>
--EXPECT--
bool(false)
bool(false)
foo