3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} 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.3.0 - 5.4.28
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::test) in /in/ugfk3 on line 4
Process exited with code 255.