Doc #74520 [Ver->Csd]: rand() - min/max documentation mismatch
| From: | peehaa@php.net | Date: | Tue, 02 May 2017 07:17:49 +0000 |
| Subject: | Doc #74520 [Ver->Csd]: rand() - min/max documentation mismatch | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14664@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74520&edit=1
ID: 74520
Updated by: peehaa@php.net
Reported by: molnarriso at gmail dot com
Summary: rand() - min/max documentation mismatch
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: peehaa
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2017-05-01 15:13:21] kelunik@php.net
If you want to, you can directly contribute a fix by using https://edit.php.net/. :-)
------------------------------------------------------------------------
[2017-05-01 14:52:27] 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()...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74520&edit=1