summaryrefslogtreecommitdiff
path: root/tests/lang/func_get_arg_variation.phpt
blob: bd1fa5b4c5c3cf565f87003fdd0436f03bde5cec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
func_get_arg test
--FILE--
<?php

function foo($a)
{
   $a=5;
   echo func_get_arg(-1);
   echo func_get_arg(2);
}
foo(2);
echo "\n";
?>
--EXPECTF--
Warning: func_get_arg():  The argument number should be >= 0 in %s on line %d

Warning: func_get_arg():  Argument 2 not passed to function in %s on line %d