3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Hoge { public function destroyThis() { $this = 'HAHAHA'; var_dump($this); } public function afterCheck() { var_dump($this); } } $hoge = new Hoge; $hoge->destroyThis(); $hoge->afterCheck();
Output for 5.3.0 - 5.5.3
Fatal error: Cannot re-assign $this in /in/GTJQ1 on line 7
Process exited with code 255.