php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74530 Wrong note for rand()
Submitted: 2017-05-02 11:28 UTC Modified: 2017-05-02 11:37 UTC
From: olafvdspek at gmail dot com Assigned:
Status: Duplicate Package: Documentation problem
PHP Version: Irrelevant OS: *
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:
31 - 8 = ?
Subscribe to this entry?

 
 [2017-05-02 11:28 UTC] olafvdspek at gmail dot com
Description:
------------
> Note: As of PHP 7.1.0, rand() uses the same random number generator as mt_rand(). To preserve backwards compatibility rand() allows min to be smaller than max as opposed to returning FALSE as mt_rand().

I assume it's supposed to say "allows min to be larger than max"..

Test script:
---------------
-

Expected result:
----------------
-

Actual result:
--------------
-

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-02 11:37 UTC] kelunik@php.net
-Status: Open +Status: Duplicate
 [2017-05-02 11:37 UTC] kelunik@php.net
Duplicate of https://bugs.php.net/bug.php?id=74520 and already fixed.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Jan 17 22:03:35 2022 UTC