3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh //strict interface Foo { public function foo(String $foo) : String; } class Bar implements Foo { public function foo(String $foo) { return new StdClass; } } $b = new Bar; var_dump($b->foo("test"));
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected 'interface' (T_INTERFACE) in /in/1Z70t on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<?hh //strict interface Foo { public function foo(String $foo) : String; } class Bar implements Foo { public function foo(String $foo) { return new StdClass; } } $b = new Bar; var_dump($b->foo("test"));