3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php test(func(), $var, 1, 1+1); function test($oh, $param, $a, $b, $c) { print $param; } function func() { print 1; } test(0, func(2), $var, 1, 1+1);
Output for 7.1.0
1 Notice: Undefined variable: var in /in/VGUml on line 3 Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 4 passed in /in/VGUml on line 3 and exactly 5 expected in /in/VGUml:5 Stack trace: #0 /in/VGUml(3): test(NULL, NULL, 1, 2) #1 {main} thrown in /in/VGUml on line 5
Process exited with code 255.
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.0.14
1 Notice: Undefined variable: var in /in/VGUml on line 3 Warning: Missing argument 5 for test(), called in /in/VGUml on line 3 and defined in /in/VGUml on line 5 1 Notice: Undefined variable: var in /in/VGUml on line 12
Output for hhvm-3.10.0 - 3.12.0
1 Notice: Undefined variable: var in /in/VGUml on line 3 Warning: test() expects exactly 5 parameters, 4 given in /in/VGUml on line 6 1 Notice: Undefined variable: var in /in/VGUml on line 12
Output for 5.0.4 - 5.0.5
1 Notice: Undefined variable: var in /in/VGUml on line 3 Warning: Missing argument 5 for test() in /in/VGUml on line 5 1 Notice: Undefined variable: var in /in/VGUml on line 12
Output for 4.3.0 - 5.0.3
1 Notice: Undefined variable: var in /in/VGUml on line 3 Warning: Missing argument 5 for test() in /in/VGUml on line 5 1 Notice: Undefined variable: var in /in/VGUml on line 12