3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface FooInterface { public function test(\StdClass $objec); } class Foo { public function test(\StdClass $objec, array $array = null) { } } class Bar extends Foo { public function test() { echo 'yes'; } } $bar = new Bar(); $bar->test(new \StdClass());
based on 0O6tn
Output for 7.1.0 - 7.2.0
Warning: Declaration of Bar::test() should be compatible with Foo::test(StdClass $objec, ?array $array = NULL) in /in/u6aXF on line 17 yes
Output for 7.0.0 - 7.0.20
Warning: Declaration of Bar::test() should be compatible with Foo::test(StdClass $objec, array $array = NULL) in /in/u6aXF on line 17 yes
Output for 5.4.1 - 5.6.28
Strict Standards: Declaration of Bar::test() should be compatible with Foo::test(StdClass $objec, array $array = NULL) in /in/u6aXF on line 17 yes
Output for 5.3.18 - 5.3.29
Strict Standards: Declaration of Bar::test() should be compatible with that of Foo::test() in /in/u6aXF on line 17 yes