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 M69Ld
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/e5DGI on line 11
Output for 5.4.11 - 5.6.21
Strict Standards: Declaration of B::f() should be compatible with A::f(Y &$y) in /in/e5DGI 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/e5DGI on line 11