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?
Answers (2)
0
Hi Akash,
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.
Accepted 1
Thanks Pravin..