summaryrefslogtreecommitdiff
path: root/tests/lang/passByReference_004.phpt
diff options
context:
space:
mode:
authorAnt Phillips <ant@php.net>2008-11-28 10:42:21 +0000
committerAnt Phillips <ant@php.net>2008-11-28 10:42:21 +0000
commit54fe78081755f1eeebc1b08b929fbf5f3452cc32 (patch)
tree72dce5b0f8af814ad573fc974bed285f38046136 /tests/lang/passByReference_004.phpt
parent18237ba8e327426314435fbf6446fe74df108600 (diff)
downloadphp-git-54fe78081755f1eeebc1b08b929fbf5f3452cc32.tar.gz
Language tests: checked on PHP 5.2.6, 5.3 and 6.0 (Windows, Linux and Linux 64 bit).
Diffstat (limited to 'tests/lang/passByReference_004.phpt')
-rw-r--r--tests/lang/passByReference_004.phpt21
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)