3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class X {} class Y extends X {} class A { function f(Y $y) {} } class B extends A { function f(X $x) {} }
based on TlYNG
Output for 7.0.0 - 7.2.0
Warning: Declaration of B::f(X $x) should be compatible with A::f(Y $y) in /in/M69Ld on line 11
Output for 5.4.11 - 5.6.28
Strict Standards: Declaration of B::f() should be compatible with A::f(Y $y) in /in/M69Ld on line 11
Output for 5.3.21 - 5.3.29
Strict Standards: Declaration of B::f() should be compatible with that of A::f() in /in/M69Ld on line 11