可能重复:
php == vs === operator
Reference - What does this symbol mean in PHP?
在PHP中,==
和===
之间有什么区别?另外,!=
和!==
之间有什么区别?感谢帮助!
答案 0 :(得分:3)
来自http://us.php.net/manual/en/language.operators.comparison.php
$a == $b Equal TRUE if $a is equal to $b after type juggling.
$a === $b Identical TRUE if $a is equal to $b, and they are of the same type.
$a != $b Not equal TRUE if $a is not equal to $b after type juggling.
$a <> $b Not equal TRUE if $a is not equal to $b after type juggling.
$a !== $b Not identical TRUE if $a is not equal to $b, or they are not of the same type.