3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ [ "id" => 1234, "name" => "John" ], [ "id" => 1235, "name" => "doe" ] ]; $b = [ [ "age" => 12 ], [ "age" => 13 ] ]; $c = array_map('array_merge', $a, $b); print_r($c);

preferences:
51.88 ms | 405 KiB | 5 Q