3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class C { function save($a, $b, $c=NULL) { echo "save something"; return 1; // id } } class D extends C { function saveD($a, $b){ return parent::save($a,$b); } } class X extends D { function save($a, $b, $c){ // do little processing with $c return $this->saveD($a,$b); } } $x = new X(); $x->save(1,2,"aaaa");
Output for 7.0.0 - 7.1.0
Warning: Declaration of X::save($a, $b, $c) should be compatible with C::save($a, $b, $c = NULL) in /in/hUeXf on line 21 save something
Output for 4.3.0 - 4.4.9, hhvm-3.10.0 - 3.12.0
save something
Output for 5.4.0 - 5.6.28
Strict Standards: Declaration of X::save() should be compatible with C::save($a, $b, $c = NULL) in /in/hUeXf on line 21 save something
Output for 5.0.0 - 5.3.29
Strict Standards: Declaration of X::save() should be compatible with that of C::save() in /in/hUeXf on line 21 save something