Date: 05/13/01
- Next message: derick <email protected>: "[PHP-DEV] Bug #10837 Updated: The "rand" function doesn't work"
- Previous message: Sebastian Bergmann: "Re: [PHP-DEV] php_domxml.c"
- Next in thread: derick <email protected>: "[PHP-DEV] Bug #10837 Updated: The "rand" function doesn't work"
- Maybe reply: derick <email protected>: "[PHP-DEV] Bug #10837 Updated: The "rand" function doesn't work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 10837
Updated by: derick
Reported By: huy91980 <email protected>
Status: Open
Bug Type: *Function Specific
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
Works for me on Linux:
[derick <email protected> 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
Previous Comments:
---------------------------------------------------------------------------
[2001-05-12 23:48:43] huy91980 <email protected>
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
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: derick <email protected>: "[PHP-DEV] Bug #10837 Updated: The "rand" function doesn't work"
- Previous message: Sebastian Bergmann: "Re: [PHP-DEV] php_domxml.c"
- Next in thread: derick <email protected>: "[PHP-DEV] Bug #10837 Updated: The "rand" function doesn't work"
- Maybe reply: derick <email protected>: "[PHP-DEV] Bug #10837 Updated: The "rand" function doesn't work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

