diff options
Diffstat (limited to 'Zend/tests/errmsg_003.phpt')
-rw-r--r-- | Zend/tests/errmsg_003.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/errmsg_003.phpt b/Zend/tests/errmsg_003.phpt new file mode 100644 index 0000000000..64e458781d --- /dev/null +++ b/Zend/tests/errmsg_003.phpt @@ -0,0 +1,19 @@ +--TEST-- +errmsg: cannot reassign $this (by ref) +--FILE-- +<?php + +class test { + function foo() { + $a = new test; + $this = &$a; + } +} + +$t = new test; +$t->foo(); + +echo "Done\n"; +?> +--EXPECTF-- +Fatal error: Cannot re-assign $this in %s on line %d |