3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); ini_set('display_errors',1); class foo { private function do_something ($str) { echo($str); } } class bar extends foo { public function do_something () { echo('baz'); } }
Output for 5.6.28, 7.0.20 - 7.2.0
Output for 7.0.0 - 7.0.6
Warning: Declaration of bar::do_something() should be compatible with foo::do_something($str) in /in/nbNLi on line 26
Output for 5.4.10 - 5.6.21
Strict Standards: Declaration of bar::do_something() should be compatible with foo::do_something($str) in /in/nbNLi on line 26
Output for 5.3.20 - 5.3.29
Strict Standards: Declaration of bar::do_something() should be compatible with that of foo::do_something() in /in/nbNLi on line 26