File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / 020.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    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>