""Gustav Wiberg"" <gustav@xxxxxxxxxxxxxx> wrote in message news:024601c5b3be$77135140$0300a8c0@xxxxxxxxxxxxxx > > ----- Original Message ----- > From: "Shaw, Chris - Accenture" <cshaw@xxxxxxxxxx> > To: "Gustav Wiberg" <gustav@xxxxxxxxxxxxxx>; "PHP General" > <php-general@xxxxxxxxxxxxx> > Sent: Wednesday, September 07, 2005 5:03 PM > Subject: RE: Integer - boundary? > > > > > -----Original Message----- > > From: Gustav Wiberg [mailto:gustav@xxxxxxxxxxxxxx] > > > > > Hi there! > > > > > What is the boundary for an integer? > > > > > seems to be a easy question, but I can't find it... > > > > > > /G > > http://www.varupiraten.se/ > > > > > According to the manual, > > > "The size of an integer is platform-dependent, although a maximum value of > about two billion is the usual value (that's 32 bits signed). PHP does not > support unsigned integers." > > > > ************************ > > This message has been delivered to the Internet by the Revenue Internet > e-mail service > > ************************* > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.10.18/91 - Release Date: 2005-09-06 > > Hi there! > > Thanx! > > Hm... I would rephrase my question.. Is it possible to get the maximum > integer-value that can be used? > Hi Try this code to see what it is on your platform: Brian <? // start with some number you are sure is an integer // make it a really high number to lessen the execution time $i = 2100000000; // if you want to do it on the first try, allow it to run until finished // it will almost certainly take more than 30 seconds set_time_limit(0); while(is_int($i)) { $i++; } // then you have the first number that doesn't qualify as int (on your platform) print($i) ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php