3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { protected $x = 3; public function test() { return function () { return $this->x; }(); } } $foo = new Foo(); var_dump($foo->test());
Output for 5.3.0 - 5.4.10
Parse error: syntax error, unexpected '(' in dn2ac on line 10
Process exited with code 255.