3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); class B { function myfunction($var = "default") { echo $var; } } class C extends B { function myfunction() { echo "myfunction"; } } $c = new C(); $c->myfunction(); $b = new B(); $b->myfunction();
Output for 7.0.0 - 7.1.0
Warning: Declaration of C::myfunction() should be compatible with B::myfunction($var = 'default') in /in/nZZHv on line 18 myfunctiondefault
Output for 5.4.0 - 5.6.28
Strict Standards: Declaration of C::myfunction() should be compatible with B::myfunction($var = 'default') in /in/nZZHv on line 18 myfunctiondefault
Output for 5.0.0 - 5.3.29
Strict Standards: Declaration of C::myfunction() should be compatible with that of B::myfunction() in /in/nZZHv on line 18 myfunctiondefault
Output for 4.3.0 - 4.4.9
myfunctiondefault