<?hh
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") : String);
<?hh
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") : String);
Output for 8.0.13
Parse error: syntax error, unexpected token "interface" in /in/JY2K3 on line 3
Process exited with code 255.