3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} abstract class Bar { public abstract function test(Foo $foo); } class Baz extends Bar { public function test($foo) { var_dump($foo); } } $f = new Foo(); $z = new Baz(); $z->test($f); $z->test(true);
Output for 5.4.0 - 5.4.28
Fatal error: Declaration of Baz::test() must be compatible with Bar::test(Foo $foo) in /in/Qedct on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Fatal error: Declaration of Baz::test() must be compatible with that of Bar::test() in /in/Qedct on line 5
Process exited with code 255.