1--TEST--
2func_get_arg test
3--FILE--
4<?php
5
6function 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}
15foo(2);
16echo "\n";
17?>
18--EXPECTF--
19Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d
20
21Warning: func_get_arg() expects exactly 1 parameter, 2 given in %s on line %d
22
23Warning: func_get_arg() expects parameter 1 to be integer, string given in %s on line %d
24
25Warning: func_get_arg():  The argument number should be >= 0 in %s on line %d
26
27Warning: func_get_arg():  Argument 2 not passed to function in %s on line %d
28