PHP 4.0 Bug #9277 Updated: Bogus warning with rand(a,b) where a == b
| From: | derick@php.net | Date: | Mon, 19 Feb 2001 19:14:22 +0000 |
| Subject: | PHP 4.0 Bug #9277 Updated: Bogus warning with rand(a,b) where a == b | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46945@lists.php.net to get a copy of this message | ||
ID: 9277
Updated by: derick
Reported By: jukkaho@mail.student.oulu.fi
Status: Closed
Bug Type: Math related
Assigned To:
Comments:
After an e-mail comversation, Jukka made it clear it is useful, so I commit a "fix" to the
CVS
Previous Comments:
---------------------------------------------------------------------------
[2001-02-15 13:04:38] derick@php.net
It's not a bug, it's clear that this was supposed not to work. And if you try rand (1,1)
it wont work either.
Another thing; I don't see why this would be usefull.
---------------------------------------------------------------------------
[2001-02-15 07:43:35] jukkaho@mail.student.oulu.fi
$value=rand(0,0);
Gives "Warning: rand(): Invalid range: 0..0 in ..." while there is nothing wrong with it.
Value shouldn't be invalid.
I'm expecting a value of 0 with probability of 100% without any warnings or is this a feature?
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9277&edit=2