3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Foo { public function bar($baz = null, $tab = null); } class Bar implements Foo { public function bar($baz = null) { } }
based on mda4N
Output for 7.0.0 - 7.2.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Bar has a deprecated constructor in /in/hcv3L on line 8 Fatal error: Declaration of Bar::bar($baz = NULL) must be compatible with Foo::bar($baz = NULL, $tab = NULL) in /in/hcv3L on line 8
Process exited with code 255.
Output for 5.4.12 - 5.6.28
Fatal error: Declaration of Bar::bar() must be compatible with Foo::bar($baz = NULL, $tab = NULL) in /in/hcv3L on line 9
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Fatal error: Declaration of Bar::bar() must be compatible with that of Foo::bar() in /in/hcv3L on line 9
Process exited with code 255.