3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* hey, i'm trying to get: Array[1] = Array ( [A1] => 123 [B1] => 1234 [C2] => Array ( [0] => 123 [1] => 456 [2] => 789 ) [R2] => Array ( [0] => 1 [1] => 4 [2] => 4 [3] => 6 ) ) */ $c = array('string'=>array("A1"=>123,"B1"=>1234,"C2"=>array(123,456,789))); $d = array('string'=>array("R2"=>array(1,4,4,6))); echo "<h1>now what</h1>"; $y = array_merge_recursive($d,$c); print_r($y);

preferences:
38.46 ms | 402 KiB | 5 Q