|
|
== and === the difference Difference between comparison operators - PHP
|
Views : 390
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Difference Between Comparison Operators == (double equals) and === (triple equals):
Even after programming for years in php many people would still be unclear of the difference between the Comparison Operators == (double equals) and === (triple equals)
== : double equals compares between two values
so
1 == 1 is TRUE
1 == "1" is also TRUE
=== : triple equals compares between values and also their data type
so
1 === 1 is TRUE
1 === "1" is FALSE
|
|
By rajesh, On - 2009-10-29 |
|
|
|