Bug #74530 [Opn->Dup]: Wrong note for rand()

From: Date: Tue, 02 May 2017 11:37:10 +0000
Subject: Bug #74530 [Opn->Dup]: Wrong note for rand()
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14667@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74530&edit=1 ID: 74530 Updated by: kelunik@php.net Reported by: olafvdspek at gmail dot com Summary: Wrong note for rand() -Status: Open +Status: Duplicate Type: Bug Package: Documentation problem Operating System: * PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Duplicate of https://bugs.php.net/bug.php?id=74520 and already fixed. Previous Comments: ------------------------------------------------------------------------ [2017-05-02 11:28:05] 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: -------------- - ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74530&edit=1

« previous php.doc.bugs (#14667) next »