3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh interface Foo { public function foo(string $foo) : string; } class Bar implements Foo { public function foo(string $foo) { return new string; } } $b = new Bar; $c = $b->foo("test"); var_dump($c);
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected 'interface' (T_INTERFACE) in /in/XI0C5 on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<?hh interface Foo { public function foo(string $foo) : string; } class Bar implements Foo { public function foo(string $foo) { return new string; } } $b = new Bar; $c = $b->foo("test"); var_dump($c);