3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a{ public function __construct(){ echo 'sub_class'; } } class b{ public function __construct(){ $this = new a(); } } $v = new b(); echo get_class($v);
Output for 5.3.0 - 5.4.17
Fatal error: Cannot re-assign $this in /in/uWH5q on line 9
Process exited with code 255.