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

From: Date: Fri, 22 Jun 2001 03:39:13 +0000
Subject: Bug #10837 Updated: The "rand" function doesn't work
Groups: php.dev 
Request: Send a blank email to php-dev+get-57621@lists.php.net to get a copy of this message
ID: 10837 Updated by: sniper Reported By: huy91980@pacbell.net Old-Status: Feedback Status: Bogus Bug Type: Math related Operating system: PHP Version: 4.0.5 Assigned To: Comments: No feedback, most likely user error. Previous Comments: --------------------------------------------------------------------------- [2001-05-13 04:49:07] derick@php.net Status: Feedback --------------------------------------------------------------------------- [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 (#57621) next »