3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { } class B { public function m(A $a = NULL, &$n) { echo "B.m";} }; class C extends B { public function m( $a ) { echo "C.m";} }; $b = new B(); $b->m(new A(), $b); $c = new C(); $c->m(new A(), $b); ?>
Output for 7.1.0 - 7.2.0
Warning: Declaration of C::m($a) should be compatible with B::m(?A $a, &$n) in /in/Sgf7O on line 4 B.mC.m
Output for 7.0.6 - 7.0.20
Warning: Declaration of C::m($a) should be compatible with B::m(A $a = NULL, &$n) in /in/Sgf7O on line 4 B.mC.m
Output for 7.0.0 - 7.0.5
Warning: Declaration of C::m($a) should be compatible with B::m(A $a, &$n) in /in/Sgf7O on line 4 B.mC.m
Output for 5.4.12 - 5.6.28
Strict Standards: Declaration of C::m() should be compatible with B::m(A $a, &$n) in /in/Sgf7O on line 4 B.mC.m
Output for 5.3.22 - 5.3.29
Strict Standards: Declaration of C::m() should be compatible with that of B::m() in /in/Sgf7O on line 4 B.mC.m