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