3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class abc{ public function func() { $x = function() use ($this) { $this->bcg(); }; $x(); } public function bcg() { echo 'HERRO'; } } (new abc)->func();
based on JHpfZ
Output for 5.3.19 - 5.6.14
Fatal error: Cannot use $this as lexical variable in /in/jsksv on line 7
Process exited with code 255.