php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23493 RAND() Not producing a random number.
Submitted: 2003-05-05 09:26 UTC Modified: 2003-05-05 12:48 UTC
From: david at buro9 dot com Assigned:
Status: Closed Package: Math related
PHP Version: 4.3.1 OS: RedHat 7.3
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: david at buro9 dot com
New email:
PHP Version: OS:

 

 [2003-05-05 09:26 UTC] david at buro9 dot com
When I try and use RAND() to produce a random number, I only ever get back the lowest whole integer.

e.g.
<?
echo rand(0,9);
?>

This will ALWAYS echo the number '0'.

I am willing to accept this may be a quirk in my system, but for the life of me I have no pointers as to where :)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-05 12:48 UTC] david at buro9 dot com
Just got my host to recompile PHP and now it's working and I can't reproduce the error.

Seems like it was just a quirk of a build. Sorry for bothering you all :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC