From:             [EMAIL PROTECTED]
Operating system: various flavors of Linux, Windows
PHP version:      4.0.4pl1
PHP Bug Type:     Feature/Change Request
Bug description:  64 bit integer support

There is some kind of 64 bit integers support, isn't it? I tried this code on several 
machines running on windows and linux platforms, and it produces the same results:

ex. 1:
for ($i=0; $i < 64; $i++) 
  echo "<br>$i - " . (1 << $i);

doing just fine with 31 bit, so $i must be 32 signed integer, but...

ex. 2:
for ($j=1, $i=0; $i < 64; $i++, $j*=2) 
  echo "<br>$i - $j";

seems to work fine until $j is less than 15 digits long (2^47), for example you may 
add echo $j % 10 and it would display -8 for each $i >= 47. But, then again...

ex. 3:
$arr = str_pad("1", 64, "0");
$y = mysql_fetch_object(mysql_query("SELECT CONV('$arr', 2, 10) AS xx"));
echo $y->xx;

works just fine, as the $y->xx is unsigned 64 bit integer? But I must admit, this is a 
silly workaround... 

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to