3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function foo($a) { var_dump($a); } } class B extends A { function foo($a, $b) { var_dump($a, $b); } } $b = new B; $b->foo(1, 2);
Output for 7.0.0 - 7.2.0
Warning: Declaration of B::foo($a, $b) should be compatible with A::foo($a) in /in/HYBf4 on line 11 int(1) int(2)
Output for 5.4.0 - 5.6.28
Strict Standards: Declaration of B::foo() should be compatible with A::foo($a) in /in/HYBf4 on line 11 int(1) int(2)
Output for 5.0.0 - 5.3.29
Strict Standards: Declaration of B::foo() should be compatible with that of A::foo() in /in/HYBf4 on line 11 int(1) int(2)
Output for 4.3.0 - 4.4.9
int(1) int(2)