PHP

array_mergeのメモ的なやつ

More than 1 year has passed since last update.
<?php
$array_a = array(
    "a" => "1",
    "b" => "2"
);

$array_b = array(
    "a" => "2",
    "b" => "3"
);

var_dump(array_merge($array_a, $array_b));

$ php test.php
array(2) {
  ["a"]=>
  string(1) "2"
  ["b"]=>
  string(1) "3"
}

上書きされる