|  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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 05:01:30 2024 UTC