As Which equals operator (== vs ===) should be used in JavaScript comparisons? indicates they are basically identical except \'===\' also ensures type equality
== compares whether the value of the 2 sides are the same or not.
=== compares whether the value and datatype of the 2 sides are the same or not.
Say we have
$var = 0;
if($var == false){
// true because 0 is also read as false
}
if(!$var){
// true because 0 is also read as false
}
if($var === false){
// false because 0 is not the same datatype as false. (int vs bool)
}
if($var !== false){
// true becuase 0 is not the same datatype as false. (int vs bool)
}
if($var === 0){
// true, the value and datatype are the same.
}
you can check http://www.jonlee.ca/the-triple-equals-in-php/