3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh class Foo { public function __construct(private int $x){}; public function xPrinter() { return () ==> print $this->x; } } $bar = new Foo(42); $xPrinter = $bar->xPrinter(); $xPrinter();
Output for 5.3.0 - 5.4.32
<?hh class Foo { public function __construct(private int $x){}; public function xPrinter() { return () ==> print $this->x; } } $bar = new Foo(42); $xPrinter = $bar->xPrinter(); $xPrinter();