php3-list | 199901
Date: 01/31/99
- Next message: Sascha Schumann: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Previous message: Martin Fischer: "[PHP3] MySql - php3 - Apache: no data"
- Next in thread: Sascha Schumann: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Reply: Sascha Schumann: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Maybe reply: Joey Smith: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Reply: Rasmus Lerdorf: "[PHP3] Re: size of int = ((2^32) / 2) - 1?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Rasmus:
Is the max size of int:
2147483647?
That's, what, 2 billion or so?
The best I could figure, that makes it
( 2^32 )
(---------) - 1
( 2 )
Am I right?
(I just wrote a script that said:
<?$i = 65537; /* The standard value of an int, right? */
while (is_int($i)) {$i++;}
exit;
?>
And piped the results to an external file. When it freaked,
and started printing negatives, I subtracted 1, and tested it.
It seems right...
A few ?'s...
Was there an easier way i could have done this?
Why didn't the script exit when it hit 2147483648,
instead of going to -2147483648?
Why that #? Why not follow the ANSI? Any particular
reson?
Am I even right?
What do I win? ;))
Thanks. I actually had a good time thinking this one
through!
Joey
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Sascha Schumann: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Previous message: Martin Fischer: "[PHP3] MySql - php3 - Apache: no data"
- Next in thread: Sascha Schumann: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Reply: Sascha Schumann: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Maybe reply: Joey Smith: "Re: [PHP3] size of int = ((2^32) / 2) - 1?"
- Reply: Rasmus Lerdorf: "[PHP3] Re: size of int = ((2^32) / 2) - 1?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

