3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set('error_reporting', E_ALL & E_NOTICE & E_WARNING & E_STRICT & E_DEPRECATED); ini_set('display_errors','On'); 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"); // YO $class->ccc("ssss"); // Nem jó
based on kbnP4
Output for 7.0.0 - 7.2.0
Warning: Declaration of B::ccc($a) should be compatible with A::ccc() in /in/CJPEe on line 25 XXXXssss
Output for 5.4.10 - 5.6.28
Strict Standards: Declaration of B::ccc() should be compatible with A::ccc() in /in/CJPEe on line 25 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/CJPEe on line 25 XXXXssss