From: [EMAIL PROTECTED] Operating system: Windows 98 PHP version: 4.2.0 PHP Bug Type: Arrays related Bug description: array_rand() is not random
The code from the manual: srand ((float) microtime() * 10000000); $input = array ("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand ($input, 2); print $input[$rand_keys[0]]."\n"; print $input[$rand_keys[1]]."\n"; always returns the same array elements. -- Edit bug report at http://bugs.php.net/?id=17138&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17138&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17138&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17138&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17138&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17138&r=support Expected behavior: http://bugs.php.net/fix.php?id=17138&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17138&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17138&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17138&r=globals