php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13147 32bit integer
Submitted: 2001-09-05 07:30 UTC Modified: 2001-11-12 01:51 UTC
From: mts at r-systems dot ee Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mts at r-systems dot ee
New email:
PHP Version: OS:

 

 [2001-09-05 07:30 UTC] mts at r-systems dot ee
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-11 15:25 UTC] sander@php.net
Stuff like this is platform- and build-dependant. Not a bug.
 [2001-11-12 01:51 UTC] mts at r-systems dot ee
Uhoh... so PHP are'nt/will not be platform dependant? I was thinking it should be...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 20:01:46 2025 UTC