3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh class Foo { public $closure; public function __construct() { $this->closure = function() { echo "OK"; }; } } ((new Foo())->closure)();
Output for 5.3.0 - 5.4.32
<?hh class Foo { public $closure; public function __construct() { $this->closure = function() { echo "OK"; }; } } ((new Foo())->closure)();