tibberous Posted April 7, 2011 Share Posted April 7, 2011 PHP says this is true: if(0 == 'gallery'){ } Why in the fuck does it consider the number 0 to be equal to the word gallery?? Quote Link to comment https://forums.phpfreaks.com/topic/232940-what-the-fuck/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 7, 2011 Share Posted April 7, 2011 http://www.php.net/manual/en/types.comparisons.php Quote Link to comment https://forums.phpfreaks.com/topic/232940-what-the-fuck/#findComment-1198069 Share on other sites More sharing options...
tibberous Posted April 7, 2011 Author Share Posted April 7, 2011 I know that it is, just wondering the logic behind why. Guess it tries to convert gallery to a number, and gets 0... made for a damn annoying bug though. Quote Link to comment https://forums.phpfreaks.com/topic/232940-what-the-fuck/#findComment-1198087 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.