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
 [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-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 08 06:05:52 2022 UTC