- print_r: documentation ( source)
- array_merge: documentation ( source)
- array_replace: documentation ( source)
<?php
$a = array('foo' => 'bar', 'some' => 'string');
$b = array(42 => 'answer to the life and everything', 1337 => 'leet');
print_r([
$a + $b,
array_merge($a, $b),
array_replace($a, $b)
]);