3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function __construct($a) { } } $a = new A;
Output for 7.1.0 - 7.2.11
Fatal error: Uncaught ArgumentCountError: Too few arguments to function A::__construct(), 0 passed in /in/rg27j on line 11 and exactly 1 expected in /in/rg27j:5 Stack trace: #0 /in/rg27j(11): A->__construct() #1 {main} thrown in /in/rg27j on line 5
Process exited with code 255.
Output for 5.6.38 - 7.0.28
Warning: Missing argument 1 for A::__construct(), called in /in/rg27j on line 11 and defined in /in/rg27j on line 5