3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //hey, i'm trying to get: $c = array('1'=>array("A1"=>123,"B1"=>1234,"C2"=>array(123,456,789))); $d = array('1'=>array("R2"=>array(1,4,4,6))); echo "<h1>now what</h1>"; $y = array_merge($d,$c); var_dump($y);
Output for 4.3.0 - 7.1.0
<h1>now what</h1>array(2) { [0]=> array(1) { ["R2"]=> array(4) { [0]=> int(1) [1]=> int(4) [2]=> int(4) [3]=> int(6) } } [1]=> array(3) { ["A1"]=> int(123) ["B1"]=> int(1234) ["C2"]=> array(3) { [0]=> int(123) [1]=> int(456) [2]=> int(789) } } }