xref: /PHP-7.3/Zend/tests/errmsg_003.phpt (revision 782352c5)
1--TEST--
2errmsg: cannot reassign $this (by ref)
3--FILE--
4<?php
5
6class test {
7	function foo() {
8		$a = new test;
9		$this = &$a;
10	}
11}
12
13$t = new test;
14$t->foo();
15
16echo "Done\n";
17?>
18--EXPECTF--
19Fatal error: Cannot re-assign $this in %s on line %d
20