3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array1 = array(1 => 'v1',2 => 'v2',3 => 'v3',4 => 'v4'); $array2 = array(1 => 'v1',2 => 'v2',5 => 'v5',6 => 'v6'); $array3 = $array1 + $array2; print_r($array3);
Output for 4.3.0 - 7.1.0
Array ( [1] => v1 [2] => v2 [3] => v3 [4] => v4 [5] => v5 [6] => v6 )