$a + $b Union Union of $a and $b.
$a == $b Equality TRUE if $a and $b have the same key/value pairs.
$a === $b Identity TRUE if $a and $b have the same key/value pairs in the same order and of the same types.
$a != $b Inequality TRUE if $a is not equal to $b.
$a <> $b Inequality TRUE if $a is not equal to $b.
$a !== $b Non-identity TRUE if $a is not identical to $b.

The + operator appends the right handed array to the left handed, whereas duplicated keys are NOT overwritten.

Example:
Code:

$p = array("a" => "Tom", "b" => "Jerry");
$q = array("a" => "Akon", "b" => "Abhay", "c" => "Mahnama");

$r = $p + $q; // Union of $p and $q

print_r ($r);

$r = $q + $p;   // Union of $q and $p

print_r($r);

Output:

Array ( [a] => Tom [b] => Jerry [c] => Mahnama )
Array ( [a] => Akon [b] => Abhay [c] => Mahnama )

eXTReMe Tracker