- Output for 5.3.0 - 5.3.26, 5.4.0 - 5.4.17
- Fatal error: Cannot re-assign $this in /in/Ynp8F on line 7
Process exited with code 255.
<?php
class a {
function overWrite() {
$tmp = &$this;
$this = new b;
}
}
class b { }
$a = new a;
$a->overWrite();
var_dump($a);