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 StdClass; } } function doWithFoo(Foo $foo) : String { return $foo->foo("test"); } var_dump(doWithFoo(new Bar));
Output for 5.3.0 - 5.4.32
<?hh interface Foo { public function foo(String $foo) : String; } class Bar implements Foo { public function foo(String $foo) { return new StdClass; } } function doWithFoo(Foo $foo) : String { return $foo->foo("test"); } var_dump(doWithFoo(new Bar));