3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public function foobar($a) { } } class bar extends foo { public function foobar($a, $b) { } } (new bar)->foobar(1, 2);
based on C4RRe
Output for 7.0.0 - 7.2.0
Warning: Declaration of bar::foobar($a, $b) should be compatible with foo::foobar($a) in /in/NqQg2 on line 14
Output for 5.4.11 - 5.6.28
Strict Standards: Declaration of bar::foobar() should be compatible with foo::foobar($a) in /in/NqQg2 on line 14
Output for 5.3.21 - 5.3.29
Strict Standards: Declaration of bar::foobar() should be compatible with that of foo::foobar() in /in/NqQg2 on line 14 Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/NqQg2 on line 16
Process exited with code 255.