Annotation of embedaddon/php/ext/standard/tests/array/bug31158.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #31158 (array_splice on $GLOBALS crashes)
        !             3: --FILE--
        !             4: <?php
        !             5: function __(){
        !             6:   $GLOBALS['a'] = "bug\n";
        !             7:   array_splice($GLOBALS,0,count($GLOBALS));
        !             8:   /* All global variables including $GLOBALS are removed */
        !             9:   echo $GLOBALS['a'];
        !            10: }
        !            11: __();
        !            12: echo "ok\n";
        !            13: ?>
        !            14: --EXPECTF--
        !            15: Notice: Undefined variable: GLOBALS in %sbug31158.php on line 6
        !            16: ok
        !            17: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>