|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10837 The "rand" function doesn't work
Submitted: 2001-05-12 23:48 UTC Modified: 2001-06-21 23:39 UTC
From: huy91980 at pacbell dot net Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.0.5 OS: Windows 2000 server
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.
Block user comment
Status: Assign to:
Bug Type:
From: huy91980 at pacbell dot net
New email:
PHP Version: OS:


 [2001-05-12 23:48 UTC] huy91980 at pacbell dot net
calling: rand(1, 50)-1 will always get 1 !! try it for your self..this bug is only in 4.05  ..i imediately rolled back to 4.04pl1 and it works perfect again.

I didn't compile my module..downloaded the win32 build.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-13 04:48 UTC]
Works for me on Linux:

[derick@aarde seti]$ php -q
echo rand(1,50)-1;
echo "\n";

Did you use srand to seed the random number generator?

 [2001-05-13 04:49 UTC]
Status: Feedback
 [2001-06-21 23:39 UTC]
No feedback, most likely user error.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 17:01:27 2023 UTC