php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74520 rand() - min/max documentation mismatch
Submitted: 2017-05-01 14:52 UTC Modified: 2017-05-02 07:17 UTC
From: molnarriso at gmail dot com Assigned: peehaa (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2017-05-01 14:52 UTC] molnarriso at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.rand
---
In second note box:

"...To preserve backwards compatibility rand() allows min to be smaller than max as opposed to returning FALSE as mt_rand()..."

This should actually be "...allows MAX to be smaller than MIN..." 

Expected result:
----------------
...To preserve backwards compatibility rand() allows max to be smaller than min as opposed to returning FALSE as mt_rand()...

Actual result:
--------------
...To preserve backwards compatibility rand() allows min to be smaller than max as opposed to returning FALSE as mt_rand()...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-01 15:13 UTC] kelunik@php.net
-Status: Open +Status: Verified
 [2017-05-01 15:13 UTC] kelunik@php.net
If you want to, you can directly contribute a fix by using https://edit.php.net/. :-)
 [2017-05-02 07:17 UTC] peehaa@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: peehaa
 [2017-05-02 07:17 UTC] peehaa@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 05:01:30 2024 UTC