<?hh //strict
interface IFoo {
public function boo() :string;
}
trait TFoo {
public function boo() {
return 1;
}
}
class Foo implements IFoo {
use TFoo;
}
$f = new Foo();
print($f->boo());
<?hh //strict
interface IFoo {
public function boo() :string;
}
trait TFoo {
public function boo() {
return 1;
}
}
class Foo implements IFoo {
use TFoo;
}
$f = new Foo();
print($f->boo());
Output for 8.0.13
Parse error: syntax error, unexpected token "interface" in /in/bmUWm 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/bmUWm on line 3
Process exited with code 255.