3v4l.org

run code in 300+ PHP versions simultaneously
<?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) ]);

preferences:
28.57 ms | 406 KiB | 5 Q