3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a { function __construct($a, $b) {var_dump(func_get_args());} } class b extends a {} new b;
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function a::__construct(), 0 passed in /in/GcNtL on line 9 and exactly 2 expected in /in/GcNtL:4 Stack trace: #0 /in/GcNtL(9): a->__construct() #1 {main} thrown in /in/GcNtL on line 4
Process exited with code 255.
Output for 5.1.0 - 5.6.25, 7.0.0 - 7.0.14
Warning: Missing argument 1 for a::__construct(), called in /in/GcNtL on line 9 and defined in /in/GcNtL on line 4 Warning: Missing argument 2 for a::__construct(), called in /in/GcNtL on line 9 and defined in /in/GcNtL on line 4 array(0) { }
Output for hhvm-3.10.0 - 3.12.0
Warning: __construct() expects exactly 2 parameters, 0 given in /in/GcNtL on line 4 array(0) { }
Output for 5.0.0 - 5.0.5
Warning: Missing argument 1 for a::__construct() in /in/GcNtL on line 4 Warning: Missing argument 2 for a::__construct() in /in/GcNtL on line 4 array(0) { }
Output for 4.3.0 - 4.4.9