In past I have implemented = and == operator..
But recently while reading a book I have seen the use of === operator..
Can anybody tell me about this?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pravin MorePosted Nov 11, 2011, 1:21 AM
A triple equals operator (===) is a comparison operator and it tests the value (variable, expression or constant) of left to the right for identicalness. The value of left and right have to be equal AND the type has to be equal as well. (i.e. both are strings or both are integers).
$a = 5;
$b = "5?;
if ($a === $b) echo "same"; // Returns FALSE
Thanks
Pravin.
Akash AhlawatPosted Nov 11, 2011, 6:58 AM