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) { } } class Bar extends Foo { public function test(\StdClass $object, array $array) { echo 'yes'; } } $bar = new Bar(); $bar->test(new \StdClass(), array());
based on KYEcQ
Output for 7.0.0 - 7.2.0
Warning: Declaration of Bar::test(StdClass $object, array $array) should be compatible with Foo::test(StdClass $objec) in /in/1ivL4 on line 17 yes
Output for 5.4.0 - 5.6.28
Strict Standards: Declaration of Bar::test() should be compatible with Foo::test(StdClass $objec) in /in/1ivL4 on line 17 yes