File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / lang / func_get_arg_variation.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 5 months 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 test
    3: --FILE--
    4: <?php
    5: 
    6: function foo($a)
    7: {
    8:    $a=5;
    9:    echo func_get_arg();
   10:    echo func_get_arg(2,2);
   11:    echo func_get_arg("hello");
   12:    echo func_get_arg(-1);
   13:    echo func_get_arg(2);
   14: }
   15: foo(2);
   16: echo "\n";
   17: ?>
   18: --EXPECTF--
   19: Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d
   20: 
   21: Warning: func_get_arg() expects exactly 1 parameter, 2 given in %s on line %d
   22: 
   23: Warning: func_get_arg() expects parameter 1 to be long, string given in %s on line %d
   24: 
   25: Warning: func_get_arg():  The argument number should be >= 0 in %s on line %d
   26: 
   27: Warning: func_get_arg():  Argument 2 not passed to function in %s on line %d
   28: 

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