3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = [["testA1", "testA2"], ["testA3", "testA4"]]; $b = [["testB1", "testB2"], ["testB3", "testB4"]]; $c = [["testC1", "testC2"], ["testC3", "testC4"]]; $result = []; foreach ($a as $k => $v) { array_push($result, ...$a[$k], ...$b[$k], ...$c[$k]); } var_export($result);
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
array ( 0 => 'testA1', 1 => 'testA2', 2 => 'testB1', 3 => 'testB2', 4 => 'testC1', 5 => 'testC2', 6 => 'testA3', 7 => 'testA4', 8 => 'testB3', 9 => 'testB4', 10 => 'testC3', 11 => 'testC4', )

preferences:
105.66 ms | 1273 KiB | 4 Q