summaryrefslogtreecommitdiff
path: root/Zend/tests/magic_by_ref_004.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/magic_by_ref_004.phpt')
-rw-r--r--Zend/tests/magic_by_ref_004.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/magic_by_ref_004.phpt b/Zend/tests/magic_by_ref_004.phpt
new file mode 100644
index 0000000..aa04d1a
--- /dev/null
+++ b/Zend/tests/magic_by_ref_004.phpt
@@ -0,0 +1,18 @@
+--TEST--
+passing parameter of __unset() by ref
+--FILE--
+<?php
+
+class test {
+ function __unset(&$name) { }
+}
+
+$t = new test;
+$name = "prop";
+
+var_dump($t->$name);
+
+echo "Done\n";
+?>
+--EXPECTF--
+Fatal error: Method test::__unset() cannot take arguments by reference in %s on line %d