3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $a = 'b'; public function bar() { $fnc = function () { var_dump(isset($this)); var_dump(isset($this->a)); } $fnc(); } } $foo = new Foo(); $foo->bar();
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '$fnc' (T_VARIABLE) in /in/htGEQ on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/htGEQ on line 13
Process exited with code 255.