What does "===" mean?

I've noticed someone using the PHP operator === which I can't make sense out of. I've tried it with a function, and it corresponds in crazy ways.

What is the definition of this operator? I can't even find it in the declaration of PHP operators.


$a === $b     (Identical)      

TRUE if $a is equal to $b , and they are of the same type. (introduced in PHP 4)

PHP Docs


http://www.php.net/ternary

$a == $b Equal TRUE if $a is equal to $b, except for (True == -1) which is still True.

$a === $b Identical TRUE if $a is equal to $b, and they are of the same type.

> "5" == 5;
True
> "5" === 5;
False

You can read here, short summary:

$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.

链接地址: http://www.djcxy.com/p/1798.html

上一篇: PHP中的!==比较运算符是什么意思?

下一篇: “===”是什么意思?