3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh //strict interface IFoo { public function boo() :string; } trait TFoo { public function boo() { return 1; } } class Foo implements IFoo { use TFoo; } $f = new Foo(); $f->boo();
Output for 5.4.0 - 5.5.13
Parse error: syntax error, unexpected 'interface' (T_INTERFACE) in /in/Ap6Ra on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
<?hh //strict interface IFoo { public function boo() :string; } trait TFoo { public function boo() { return 1; } } class Foo implements IFoo { use TFoo; } $f = new Foo(); $f->boo();