#23493 [NEW]: RAND() Not producing a random number.

From: Date: Mon, 05 May 2003 14:26:04 +0000
Subject: #23493 [NEW]: RAND() Not producing a random number.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39079@lists.php.net to get a copy of this message
From:             david at buro9 dot com
Operating system: RedHat 7.3 
PHP version:      4.3.1
PHP Bug Type:     Math related
Bug description:  RAND() Not producing a random number.

When I try and use RAND() to produce a random number, I only ever get back
the lowest whole integer.

e.g.
<?
echo rand(0,9);
?>

This will ALWAYS echo the number '0'.

I am willing to accept this may be a quirk in my system, but for the life
of me I have no pointers as to where :)
-- 
Edit bug report at http://bugs.php.net/?id=23493&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23493&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23493&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23493&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23493&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23493&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23493&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23493&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23493&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23493&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23493&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23493&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23493&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23493&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23493&r=gnused



Thread (2 messages)

« previous php.bugs (#39079) next »