Doc #74520 [Opn->Ver]: rand() - min/max documentation mismatch
| From: | kelunik@php.net | Date: | Mon, 01 May 2017 15:13:24 +0000 |
| Subject: | Doc #74520 [Opn->Ver]: rand() - min/max documentation mismatch | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14663@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: kelunik@php.net
Reported by: molnarriso at gmail dot com
Summary: rand() - min/max documentation mismatch
-Status: Open
+Status: Verified
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
If you want to, you can directly contribute a fix by using https://edit.php.net/. :-)
Previous Comments:
------------------------------------------------------------------------
[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