3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $foo; public function __construct() { $foo = function() { return false; } } public function foo() { return true; } } $Foo = new Foo; var_dump($foo->foo); var_dump($foo->foo());
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected '}' in /in/PB5hj on line 9
Process exited with code 255.