3v4l.org

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