3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a { var $text; function a() { $this->text = 'OK'; } } class b { var $text = 'NOT OK'; function b() { $this = new a(); } } $myClass = new b(); echo $myClass->text; ?>
Output for 5.3.0 - 5.4.9
Fatal error: Cannot re-assign $this in /in/4nlvt on line 11
Process exited with code 255.