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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Apr 18 09:01:27 2024 UTC