3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); abstract class A { public function __construct() {} public function fn() {} } class B extends A { public function __construct($foo, $bar, $baz) { parent::__construct(); } public function fn($foo) {} }
Output for 7.0.0 - 7.1.0
Warning: Declaration of B::fn($foo) should be compatible with A::fn() in /in/5C7MV on line 20
Output for hhvm-3.10.0 - 3.13.2
Output for 5.4.0 - 5.6.26
Strict Standards: Declaration of B::fn() should be compatible with A::fn() in /in/5C7MV on line 20
Output for 5.0.0 - 5.3.29
Strict Standards: Declaration of B::fn() should be compatible with that of A::fn() in /in/5C7MV on line 20
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CLASS in /in/5C7MV on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_CLASS in /in/5C7MV on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/5C7MV on line 3
Process exited with code 255.