Annotation of embedaddon/php/tests/lang/passByReference_012.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test pass by reference semantics
        !             3: --FILE--
        !             4: <?php
        !             5: error_reporting(E_ALL | E_STRICT | E_NOTICE);
        !             6: 
        !             7: // Simplified array_shift_variation5.phpt
        !             8: // Showing warning:
        !             9: // "Only variables should be passed by reference in %s on line %d"
        !            10: $stack = array ( array ( 'two' ));
        !            11: var_dump(array_shift(array_shift($stack)));
        !            12: 
        !            13: // This should show the identical warning 
        !            14: $original = array ( array ( 'one' ));
        !            15: $stack = $original;
        !            16: var_dump(array_shift(array_shift($stack)));
        !            17: ?>
        !            18: ===DONE===
        !            19: --EXPECTF--
        !            20: Strict Standards: Only variables should be passed by reference in %s on line %d
        !            21: string(3) "two"
        !            22: 
        !            23: Strict Standards: Only variables should be passed by reference in %s on line %d
        !            24: string(3) "one"
        !            25: ===DONE===

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