summaryrefslogtreecommitdiff
path: root/tests/lang/passByReference_002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/passByReference_002.phpt')
-rw-r--r--tests/lang/passByReference_002.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lang/passByReference_002.phpt b/tests/lang/passByReference_002.phpt
new file mode 100644
index 0000000..d1968a3
--- /dev/null
+++ b/tests/lang/passByReference_002.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Attempt to pass a constant by reference
+--FILE--
+<?php
+
+function f(&$arg1)
+{
+ var_dump($arg1++);
+}
+
+f(2);
+
+?>
+--EXPECTF--
+Fatal error: Only variables can be passed by reference in %s on line 8