diff options
Diffstat (limited to 'tests/lang/passByReference_002.phpt')
-rw-r--r-- | tests/lang/passByReference_002.phpt | 15 |
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 0000000000..d1968a3528 --- /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 |