3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = 1; $f = 1.1; function test($a, $b, $c, $d) { var_dump($a, $b, $c, $d); } test($i++, $i++, $i++); var_dump($i, $f);
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 3 passed in /in/KrKFj on line 8 and exactly 4 expected in /in/KrKFj:6 Stack trace: #0 /in/KrKFj(8): test(1, 2, 3) #1 {main} thrown in /in/KrKFj on line 6
Process exited with code 255.
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.0.14
Warning: Missing argument 4 for test(), called in /in/KrKFj on line 8 and defined in /in/KrKFj on line 6 Notice: Undefined variable: d in /in/KrKFj on line 6 int(1) int(2) int(3) NULL int(4) float(1.1)
Output for hhvm-3.10.0 - 3.13.2
Warning: test() expects exactly 4 parameters, 3 given in /in/KrKFj on line 6 Notice: Undefined variable: d in /in/KrKFj on line 6 int(1) int(2) int(3) NULL int(4) float(1.1)
Output for 4.3.0 - 5.0.5
Warning: Missing argument 4 for test() in /in/KrKFj on line 6 int(1) int(2) int(3) NULL int(4) float(1.1)