3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { } class B { public function test(A $a) { var_dump($a); } } class C extends B { public function test($a) { parent::test($a); } } $c = new C; $c->test(new A);
based on qlFSL
Output for 7.2.0
object(A)#2 (0) { }
Output for 7.0.0 - 7.1.10
Warning: Declaration of C::test($a) should be compatible with B::test(A $a) in /in/93qEQ on line 16 object(A)#2 (0) { }
Output for 5.4.10 - 5.6.28
Strict Standards: Declaration of C::test() should be compatible with B::test(A $a) in /in/93qEQ on line 16 object(A)#2 (0) { }
Output for 5.3.20 - 5.3.29
Strict Standards: Declaration of C::test() should be compatible with that of B::test() in /in/93qEQ on line 16 object(A)#2 (0) { }