mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
18 lines
342 B
Plaintext
18 lines
342 B
Plaintext
|
--TEST--
|
||
|
Bug #31158 (array_splice on $GLOBALS crashes)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
function __(){
|
||
|
$GLOBALS['a'] = "bug\n";
|
||
|
array_splice($GLOBALS,0,count($GLOBALS));
|
||
|
/* All global variables including $GLOBALS are removed */
|
||
|
echo $GLOBALS['a'];
|
||
|
}
|
||
|
__();
|
||
|
echo "ok\n";
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Notice: Undefined variable: GLOBALS in %sbug31158.php on line 6
|
||
|
ok
|
||
|
|