From:             adamm at nycap dot rr dot com
Operating system: windows
PHP version:      4.3.3
PHP Bug Type:     Scripting Engine problem
Bug description:  problem with rand()

Description:
------------
I am developing on a newly setup Windows XP Box running PHP 4.3.3 on IIS
as CGI.

The rand() function is not generating random numbers. Even with a min/max
declared it will only once generate a number in that range... and than any
other time called (even across browser sessions) it will always and
forever generate the same number.

The code below is broken down to the smallest example possible.

Reproduce code:
---------------
<?php
echo rand();
?>

Expected result:
----------------
I expect to see a random number.

Actual result:
--------------
The same number is always displayed.

-- 
Edit bug report at http://bugs.php.net/?id=25639&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25639&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25639&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25639&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25639&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25639&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25639&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25639&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25639&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25639&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25639&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25639&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25639&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25639&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25639&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25639&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25639&r=float

Reply via email to