3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(array('fname' => 'hak', 'lname' => 're'), array('fname' => 'iro', 'lname' => 'egbu')); $b = array(array('fname' => 'nik', 'lname' => 'iC'), array('fname' => 'hak', 'lname' => 're')); $c = array_merge($a, $b); var_dump($c);
Output for 4.3.0 - 7.1.0
array(4) { [0]=> array(2) { ["fname"]=> string(3) "hak" ["lname"]=> string(2) "re" } [1]=> array(2) { ["fname"]=> string(3) "iro" ["lname"]=> string(4) "egbu" } [2]=> array(2) { ["fname"]=> string(3) "nik" ["lname"]=> string(2) "iC" } [3]=> array(2) { ["fname"]=> string(3) "hak" ["lname"]=> string(2) "re" } }