3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a, $b, $c) { var_dump(array_map([1, 2], 'func_get_args')); } test();
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 0 passed in /in/rOkLs on line 6 and exactly 3 expected in /in/rOkLs:3 Stack trace: #0 /in/rOkLs(6): test() #1 {main} thrown in /in/rOkLs on line 3
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20
Warning: Missing argument 1 for test(), called in /in/rOkLs on line 6 and defined in /in/rOkLs on line 3 Warning: Missing argument 2 for test(), called in /in/rOkLs on line 6 and defined in /in/rOkLs on line 3 Warning: Missing argument 3 for test(), called in /in/rOkLs on line 6 and defined in /in/rOkLs on line 3 Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /in/rOkLs on line 4 NULL

preferences:
180.38 ms | 403 KiB | 214 Q