RE: [PHP] peculiar behaviour of large integers with "<" and ">"

From: Date: Fri, 13 Jul 2001 18:23:21 +0000
Subject: RE: [PHP] peculiar behaviour of large integers with "<" and ">"
Groups: php.general 
Request: Send a blank email to php-general+get-57778@lists.php.net to get a copy of this message
<? // compare 5 to the max value of an integer if (5 < -2147483647) { print "This is"; } else { print "Nothing "; } // knock a digit off the max and compare again if (5 < -214748364) { print "weird"; } else { print "unusual"; } ?> I get nothing unusual.... Kirk > -----Original Message----- > From: scott [gts] [mailto:scott@graphictype.com] > Sent: Friday, July 13, 2001 12:08 PM > To: php > Subject: [PHP] peculiar behaviour of large integers with "<" and ">" > > > Has anyone come across this before? > > // compare 5 to the max value of an integer > if (5 < -2147483647) { > print "This is"; > } > > // knock a digit off the max and compare again > if (5 < -214748364) { > print "weird"; > }

« previous php.general (#57778) next »