3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Foo { function bar($foo); } class Qux implements Foo { public function bar(Qux $foo) {} }
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of Qux::bar(Qux $foo) must be compatible with Foo::bar($foo) in /in/33oEK on line 5
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Fatal error: Declaration of Qux::bar() must be compatible with Foo::bar($foo) in /in/33oEK on line 5
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Fatal error: Declaration of Qux::bar() must be compatible with that of Foo::bar() in /in/33oEK on line 5
Process exited with code 255.