php-src/Zend/tests/foreach_unset_globals.phpt
Antony Dovgal a270199067 fix bug reported by Henrique
add test
2008-08-10 21:23:21 +00:00

22 lines
276 B
PHP

--TEST--
traverse an array and use its keys to unset GLOBALS
--FILE--
<?php
$arr = array("a" => 1, "b" => 2);
foreach ($arr as $key => $val) {
unset($GLOBALS[$key]);
}
var_dump($arr);
echo "Done\n";
?>
--EXPECTF--
array(2) {
[u"a"]=>
int(1)
[u"b"]=>
int(2)
}
Done