PHP 4.0 Bug #1857: rand() produces values outside a specified range

From: Date: Fri, 23 Jul 1999 23:56:38 +0000
Subject: PHP 4.0 Bug #1857: rand() produces values outside a specified range
Groups: php.dev 
Request: Send a blank email to php-dev+get-9077@lists.php.net to get a copy of this message
From: andrew@walcat.ac.uk Operating system: RH6 PHP version: 4.0 Beta 1 PHP Bug Type: Misbehaving function Bug description: rand() produces values outside a specified range Hello, This error seems to be exactly like the one present in 3.0.6, rand() generates values outside the given range. I have run the following code many times and get numbers well above 122, and numbers below 97 too. <? srand((double)microtime()*1000000); $rand = rand(97,122); echo($rand); ?> Regards, Andy Pitt.

« previous php.dev (#9077) next »