3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function __construct() { echo "A"; } public function ccc() { echo "A"; } } class B extends A { public function __construct($a) { echo $a; } public function ccc($a) { echo $a; } } $class = new B("XXXX"); $class->ccc("ssss");
based on vHGKs
Output for 7.0.0 - 7.2.0
Warning: Declaration of B::ccc($a) should be compatible with A::ccc() in /in/kbnP4 on line 22 XXXXssss
Output for 5.4.10 - 5.6.28
Strict Standards: Declaration of B::ccc() should be compatible with A::ccc() in /in/kbnP4 on line 22 XXXXssss
Output for 5.3.20 - 5.3.29
Strict Standards: Declaration of B::ccc() should be compatible with that of A::ccc() in /in/kbnP4 on line 22 XXXXssss