summaryrefslogtreecommitdiff
path: root/Zend/tests/magic_by_ref_005.phpt
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-08-31 12:36:14 +0000
committerAntony Dovgal <tony2001@php.net>2007-08-31 12:36:14 +0000
commit90d58d466880e16df63d0ebe00b4c4db60b01184 (patch)
treeba293cebcdd924a4418117215f199e5949d8c15c /Zend/tests/magic_by_ref_005.phpt
parent39bceffc4a318469c5333cfd5425b9e4aac196c6 (diff)
downloadphp-git-90d58d466880e16df63d0ebe00b4c4db60b01184.tar.gz
MFH: prohibit arguments by ref in magic methods
Diffstat (limited to 'Zend/tests/magic_by_ref_005.phpt')
-rw-r--r--Zend/tests/magic_by_ref_005.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/magic_by_ref_005.phpt b/Zend/tests/magic_by_ref_005.phpt
new file mode 100644
index 0000000000..513c0618df
--- /dev/null
+++ b/Zend/tests/magic_by_ref_005.phpt
@@ -0,0 +1,18 @@
+--TEST--
+passing parameter of __isset() by ref
+--FILE--
+<?php
+
+class test {
+ function __isset(&$name) { }
+}
+
+$t = new test;
+$name = "prop";
+
+var_dump(isset($t->$name));
+
+echo "Done\n";
+?>
+--EXPECTF--
+Fatal error: Method test::__isset() cannot take arguments by reference in %s on line %d