diff options
Diffstat (limited to 'tests/lang/passByReference_004.phpt')
-rw-r--r-- | tests/lang/passByReference_004.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/lang/passByReference_004.phpt b/tests/lang/passByReference_004.phpt new file mode 100644 index 0000000000..e8a7963d26 --- /dev/null +++ b/tests/lang/passByReference_004.phpt @@ -0,0 +1,21 @@ +--TEST-- +passing the return value from a function by reference +--FILE-- +<?php + +function foo(&$ref) +{ + var_dump($ref); +} + +function bar($value) +{ + return $value; +} + +foo(bar(5)); + +?> +--EXPECTF-- +Strict Standards: Only variables should be passed by reference in %s on line 13 +int(5) |