3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a['a'] = array(3 => '123', 5 => '234'); $p = array(6 => '789', 9 => '876'); $a['a'] = $a['a'] + $p; var_dump($a);
based on rGRRp
Output for 4.3.0 - 7.2.0
array(1) { ["a"]=> array(4) { [3]=> string(3) "123" [5]=> string(3) "234" [6]=> string(3) "789" [9]=> string(3) "876" } }