mirror of
https://github.com/php/php-src.git
synced 2025-01-25 05:04:20 +08:00
new test
This commit is contained in:
parent
273ebb45c9
commit
18547585bf
21
Zend/tests/foreach_unset_globals.phpt
Normal file
21
Zend/tests/foreach_unset_globals.phpt
Normal file
@ -0,0 +1,21 @@
|
||||
--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) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
int(2)
|
||||
}
|
||||
Done
|
Loading…
Reference in New Issue
Block a user