锟斤拷锟斤拷锟斤拷锟斤拷锟�

锟斤拷锟斤拷锟斤拷锟斤拷锟�
锟斤拷锟斤拷 锟斤拷锟斤拷 锟斤拷锟�
$a + $b 锟斤拷锟斤拷 $a 锟斤拷 $b 锟斤拷锟斤拷锟较★拷
$a == $b 锟斤拷锟� 锟斤拷锟� $a 锟斤拷 $b 锟斤拷锟斤拷锟斤拷同锟侥硷拷锟斤拷值锟斤拷锟斤拷为 TRUE锟斤拷
$a === $b 全锟斤拷 锟斤拷锟� $a 锟斤拷 $b 锟斤拷锟斤拷锟斤拷同锟侥硷拷锟斤拷值锟皆诧拷锟斤拷顺锟斤拷锟斤拷锟斤拷投锟斤拷锟酵拷锟轿� TRUE锟斤拷
$a != $b 锟斤拷锟斤拷 锟斤拷锟� $a 锟斤拷锟斤拷锟斤拷 $b 锟斤拷为 TRUE锟斤拷
$a <> $b 锟斤拷锟斤拷 锟斤拷锟� $a 锟斤拷锟斤拷锟斤拷 $b 锟斤拷为 TRUE锟斤拷
$a !== $b 锟斤拷全锟斤拷 锟斤拷锟� $a 锟斤拷全锟斤拷锟斤拷 $b 锟斤拷为 TRUE锟斤拷

+ 锟斤拷锟斤拷锟斤拷锟斤拷冶叩锟斤拷锟斤拷锟皆拷馗锟斤拷拥锟斤拷锟竭碉拷锟斤拷锟斤拷锟斤拷妫拷锟斤拷锟斤拷锟斤拷锟斤拷卸锟斤拷械募锟斤拷锟斤拷锟斤拷锟街伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟叫的o拷锟揭边的憋拷锟斤拷锟皆★拷

<?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(3) {
  ["a"]=>
  string(5) "apple"
  ["b"]=>
  string(6) "banana"
  ["c"]=>
  string(6) "cherry"
}
Union of $b and $a:
array(3) {
  ["a"]=>
  string(4) "pear"
  ["b"]=>
  string(10) "strawberry"
  ["c"]=>
  string(6) "cherry"
}
Union of $a += $b:
array(3) {
  'a' =>
  string(5) "apple"
  'b' =>
  string(6) "banana"
  'c' =>
  string(6) "cherry"
}

锟斤拷锟斤拷锟叫的碉拷元锟斤拷锟斤拷锟斤拷锟斤拷锟酵拷募锟斤拷锟斤拷锟街碉拷锟饺斤拷时锟斤拷取锟�

Example #1 锟饺斤拷锟斤拷锟斤拷

<?php
$a 
= array("apple""banana");
$b = array(=> "banana""0" => "apple");

var_dump($a == $b); // bool(true)
var_dump($a === $b); // bool(false)
?>

锟轿硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟介函锟斤拷锟铰节★拷