note 35434 deleted from function.rand by nlopess
| From: | nlopess@php.net | Date: | Wed, 17 Dec 2003 16:34:26 +0000 |
| Subject: | note 35434 deleted from function.rand by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62131@lists.php.net to get a copy of this message | ||
Note Submitter: tsoyalexii@mail.ru
----
there is some notice for this function:
if you use this:
$a = intval(rand(0,-5)); // wrong order of Max and Min values
value of $a will be in range [0;-3]
if you use this:
$b = intval(rand(-5,0)); // right order of Max and Min value
value of $b will be in range [0;-5]
Alex