3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('a' => 'some value', 'b' => 'some value', 'c' => 'some value'); $b = array('a' => 'another value', 'd' => 'another value', 'e' => 'another value', 'f' => 'another value'); $c = array('b' => 'some more value', 'x' => 'some more value', 'y' => 'some more value', 'z' => 'some more value'); $merged = array_merge($a, $b); var_dump($merged);
based on D6uml
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(6) { ["a"]=> string(13) "another value" ["b"]=> string(10) "some value" ["c"]=> string(10) "some value" ["d"]=> string(13) "another value" ["e"]=> string(13) "another value" ["f"]=> string(13) "another value" }