3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array('a'=>1, 'b'=>2); var_dump($a + array('a' =>4, 'c' =>3)); var_dump(array_merge($a, array('a' =>4, 'c' =>3)));
Output for 4.3.0 - 7.2.0
array(3) { ["a"]=> int(1) ["b"]=> int(2) ["c"]=> int(3) } array(3) { ["a"]=> int(4) ["b"]=> int(2) ["c"]=> int(3) }