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

function foo($a)
{
    try {
        var_dump(func_get_arg(2));
    } catch (\Error $e) {
        echo $e->getMessage() . \PHP_EOL;
    }
}
foo(2, 3);

?>
--EXPECT--
func_get_arg(): Argument 2 not passed to function