3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class ParentClass { public final function __construct($x) { echo 'a'; } } class ChildClass extends ParentClass { } new ChildClass;
based on PcaqC
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function ParentClass::__construct(), 0 passed in /in/g3hdE on line 13 and exactly 1 expected in /in/g3hdE:4 Stack trace: #0 /in/g3hdE(13): ParentClass->__construct() #1 {main} thrown in /in/g3hdE on line 4
Process exited with code 255.
Output for 5.3.20 - 7.0.20
Warning: Missing argument 1 for ParentClass::__construct(), called in /in/g3hdE on line 13 and defined in /in/g3hdE on line 4 a