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?? 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 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. Link to comment https://forums.phpfreaks.com/topic/232940-what-the-fuck/#findComment-1198087 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.