3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public function __construct() { $this->foo = function () { echo 'foo'; }; } public function doFoo() { {$this->foo}(); } } (new Foo())->doFoo();
Output for 5.3.0 - 5.4.19
Parse error: syntax error, unexpected '}' in /in/dYP87 on line 13
Process exited with code 255.