xref: /PHP-7.2/Zend/tests/errmsg_003.phpt (revision 17ccbeec)
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