summaryrefslogtreecommitdiff
path: root/tests/lang/func_get_arg.004.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/func_get_arg.004.phpt')
-rw-r--r--tests/lang/func_get_arg.004.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lang/func_get_arg.004.phpt b/tests/lang/func_get_arg.004.phpt
new file mode 100644
index 0000000..6931df0
--- /dev/null
+++ b/tests/lang/func_get_arg.004.phpt
@@ -0,0 +1,16 @@
+--TEST--
+func_get_arg on non-existent arg
+--FILE--
+<?php
+
+function foo($a)
+{
+ var_dump(func_get_arg(2));
+}
+foo(2, 3);
+echo "\n";
+
+?>
+--EXPECTF--
+Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d
+bool(false) \ No newline at end of file