summaryrefslogtreecommitdiff
path: root/Zend/tests/errmsg_005.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/errmsg_005.phpt')
-rw-r--r--Zend/tests/errmsg_005.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/errmsg_005.phpt b/Zend/tests/errmsg_005.phpt
new file mode 100644
index 0000000000..31c924cbb3
--- /dev/null
+++ b/Zend/tests/errmsg_005.phpt
@@ -0,0 +1,18 @@
+--TEST--
+errmsg: can't use method return value in write context
+--FILE--
+<?php
+
+class test {
+ function foo() {
+ return "blah";
+ }
+}
+
+$t = new test;
+$t->foo() = 1;
+
+echo "Done\n";
+?>
+--EXPECTF--
+Fatal error: Can't use method return value in write context in %s on line %d