summaryrefslogtreecommitdiff
path: root/tests/lang/func_get_arg.003.phpt
blob: 7021f31450750acb954898ae747b86d99fc9879f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
func_get_arg outside of a function declaration
--FILE--
<?php

try {
    var_dump(func_get_arg(0));
} catch (\Error $e) {
    echo $e->getMessage() . \PHP_EOL;
}

?>
--EXPECT--
func_get_arg() cannot be called from the global scope