What does === mean in php

Possible Duplicate:
What does “===” mean?

i am seeing === often in php statements, but don't know what it mean. eg if ($pwd === PwdHash($pass,substr($pwd,0,9))). thanks


It tests equality, but unlike == it requires that the two operands be of the same type as well as value.

For instance, "1" == 1 will be true, but "1" === 1 is false because the type is different.


php has two types of equal comparison operator == and ===

== check for the equalization but not strict mean it will return true for ('123'==123)

=== is a strict equal operator it will return false for the ('123'===123)

read more about these from here

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

上一篇: 0代表什么?

下一篇: ===在php中是什么意思