fork download
  1. <?php
  2.  
  3. // your code goes here
  4. $a = ['test1' => 1, 'test2' => 2];
  5. $b = ['test3' => 3, 'test2' => 22];
  6. $c = ['test4' => 4];
  7.  
  8. $result = array_merge($a, $b, $c);
  9. var_dump($result);
Success #stdin #stdout 0.03s 25192KB
stdin
Standard input is empty
stdout
array(4) {
  ["test1"]=>
  int(1)
  ["test2"]=>
  int(22)
  ["test3"]=>
  int(3)
  ["test4"]=>
  int(4)
}