Annotation of embedaddon/php/Zend/tests/020.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: func_get_arg() invalid usage
                      3: --FILE--
                      4: <?php
                      5: 
                      6: var_dump(func_get_arg(1,2,3));
                      7: var_dump(func_get_arg(1));
                      8: var_dump(func_get_arg());
                      9: 
                     10: function bar() {
                     11:        var_dump(func_get_arg(1));
                     12: }
                     13: 
                     14: function foo() {
                     15:        bar(func_get_arg(1));
                     16: }
                     17: 
                     18: foo(1,2);
                     19: 
                     20: echo "Done\n";
                     21: ?>
                     22: --EXPECTF--    
                     23: Warning: func_get_arg() expects exactly 1 parameter, 3 given in %s on line %d
                     24: NULL
                     25: 
                     26: Warning: func_get_arg():  Called from the global scope - no function context in %s on line %d
                     27: bool(false)
                     28: 
                     29: Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d
                     30: NULL
                     31: 
                     32: Warning: func_get_arg():  Argument 1 not passed to function in %s on line %d
                     33: bool(false)
                     34: Done

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