chmpdog Posted June 11, 2010 Share Posted June 11, 2010 whats the difference between !== and != Link to comment https://forums.phpfreaks.com/topic/204524-differences-between-and/ Share on other sites More sharing options...
Alex Posted June 11, 2010 Share Posted June 11, 2010 != means not equal. !== means not identical. See the manual on comparison operators. Here's an example demonstrating the difference: $var1 = false; $var2 = 0; if($var1 != $var2){ // Won't get here because 0 == false (evaluates to) } if($var1 !== $var2){ // Will get here because $var1 isn't identical to $var2 } Link to comment https://forums.phpfreaks.com/topic/204524-differences-between-and/#findComment-1070935 Share on other sites More sharing options...
Maq Posted June 11, 2010 Share Posted June 11, 2010 To be more specific it checks data type along with value. Link to comment https://forums.phpfreaks.com/topic/204524-differences-between-and/#findComment-1070942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.