3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Ia {} interface Ib extends Ia {} class Foo { protected function xyz(Ib $x) {} } class Bar extends Foo { protected function xyz(Ia $x) {} }
based on JUndH
Output for 7.0.0 - 7.2.0
Warning: Declaration of Bar::xyz(Ia $x) should be compatible with Foo::xyz(Ib $x) in /in/66uJQ on line 9
Output for 5.4.11 - 5.6.28
Strict Standards: Declaration of Bar::xyz() should be compatible with Foo::xyz(Ib $x) in /in/66uJQ on line 9
Output for 5.3.21 - 5.3.29
Strict Standards: Declaration of Bar::xyz() should be compatible with that of Foo::xyz() in /in/66uJQ on line 9