chmpdog Posted June 11, 2010 Share Posted June 11, 2010 whats the difference between !== and != Quote 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 } Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/204524-differences-between-and/#findComment-1070942 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.