3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Foo { public function bar($baz = null); } class Bat implements Foo { public function bar($baz) { echo "test"; } }
based on 3474A
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of Bat::bar($baz) must be compatible with Foo::bar($baz = NULL) in /in/29vHV on line 7
Process exited with code 255.
Output for 5.4.1 - 5.6.28
Fatal error: Declaration of Bat::bar() must be compatible with Foo::bar($baz = NULL) in /in/29vHV on line 7
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Fatal error: Declaration of Bat::bar() must be compatible with that of Foo::bar() in /in/29vHV on line 7
Process exited with code 255.