php-src/Zend/tests/foreach_unset_globals.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

22 lines
273 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";
?>
--EXPECT--
array(2) {
["a"]=>
int(1)
["b"]=>
int(2)
}
Done