<?php $a = array("a" => "apple", "b" => "banana"); $b = array("a" => "pear", "b" => "strawberry", "c" => "cherry"); $c = $a + $b; // Union of $a and $b echo "Union of \$a and \$b: \n"; var_dump($c); $c = $b + $a; // Union of $b and $a echo "Union of \$b and \$a: \n"; var_dump($c); $a += $b; // Union of $a += $b is $a and $b echo "Union of \$a += \$b: \n"; var_dump($a); ?> Union of $a and $b: array
![PHP: 配列演算子 - Manual](https://cdn-ak-scissors.b.st-hatena.com/image/square/4dd02c2555ca1b32548779e23dc3e33a9f46bf13/height=288;version=1;width=512/https%3A%2F%2Fwww.php.net%2Fimages%2Fmeta-image.png)