3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Foo { public function bar($baz = null); } class Bar implements Foo { public function bar() { } }
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/mda4N on line 8 Fatal error: Declaration of Bar::bar() must be compatible with Foo::bar($baz = NULL) in /in/mda4N 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) in /in/mda4N 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/mda4N on line 9
Process exited with code 255.