Bug #10837 Updated: The "rand" function doesn't work

From: Date: Sun, 13 May 2001 08:49:07 +0000
Subject: Bug #10837 Updated: The "rand" function doesn't work
Groups: php.dev 
Request: Send a blank email to php-dev+get-55071@lists.php.net to get a copy of this message
ID: 10837 Updated by: derick Reported By: huy91980@pacbell.net Old-Status: Open Status: Feedback Bug Type: *Function Specific Operating system: PHP Version: 4.0.5 Assigned To: Comments: Status: Feedback Previous Comments: --------------------------------------------------------------------------- [2001-05-13 04:48:20] derick@php.net Works for me on Linux: [derick@aarde seti]$ php -q <?php echo rand(1,50)-1; echo "n"; ?> 27 Did you use srand to seed the random number generator? (www.php.net/srand) regards, Derick --------------------------------------------------------------------------- [2001-05-12 23:48:43] huy91980@pacbell.net calling: rand(1, 50)-1 will always get 1 !! try it for your self..this bug is only in 4.05 ..i imediately rolled back to 4.04pl1 and it works perfect again. I didn't compile my module..downloaded the win32 build. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10837&edit=2

« previous php.dev (#55071) next »