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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
35 + 44 = ?
Subscribe to this entry?

 
 [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: Tue Apr 23 23:01:29 2024 UTC