Bug #13147: 32bit integer

From: Date: Wed, 05 Sep 2001 11:30:20 +0000
Subject: Bug #13147: 32bit integer
Groups: php.dev 
Request: Send a blank email to php-dev+get-65149@lists.php.net to get a copy of this message
From:             mts@r-systems.ee
Operating system: Linux
PHP version:      4.0.6
PHP Bug Type:     *General Issues
Bug description:  32bit integer


for ( $i = 0; $i < 100; $i++ )
    echo crc32(rand(1,10 * $i))."<BR>";

works differently on alpha and intel machines. on intel it outputs values
from -2G to 2G, but on alpha 0 to 4G. I dont i`m not sure that its not a
feature. I tryd to avoid this by sprintf("%u", crc32(...)) but this doesnt
seems to work on alpha (php 4.0.4pl1). Cant upgrade it beacouse thats not
my machine to manage.
-- 
Edit bug report at: http://bugs.php.net/?id=13147&edit=1



Thread (3 messages)

« previous php.dev (#65149) next »