3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($bar, ...$vargs) { var_dump($bar, $vargs); } foo(...['a' => 1, 'b' => 2, 'c' => 3], ...[4, 5, 6]);
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
int(4) array(5) { [0]=> int(5) [1]=> int(6) ["a"]=> int(1) ["b"]=> int(2) ["c"]=> int(3) }

preferences:
55.89 ms | 406 KiB | 5 Q