3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($name1, ...$args) { var_dump(func_get_args()); } test('test', name2: 'test');
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
array(1) { [0]=> string(4) "test" }
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Parse error: syntax error, unexpected ':', expecting ')' in /in/d13tj on line 7
Process exited with code 255.

preferences:
156.83 ms | 401 KiB | 152 Q