<?hh //strict
interface Foo {
public function foo(String $foo) : String;
}
class TestClass {
}
class Bar implements Foo {
public function foo(String $foo) {
return 45;
}
}
$b = new Bar;
var_dump($b->foo("test"));
<?hh //strict
interface Foo {
public function foo(String $foo) : String;
}
class TestClass {
}
class Bar implements Foo {
public function foo(String $foo) {
return 45;
}
}
$b = new Bar;
var_dump($b->foo("test"));
Output for 8.0.13
Parse error: syntax error, unexpected token "interface" in /in/68re1 on line 3
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Parse error: syntax error, unexpected 'interface' (T_INTERFACE) in /in/68re1 on line 3
Process exited with code 255.