ID: 19869 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: windows PHP Version: 4.2.2 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-10-11 13:12:25] [EMAIL PROTECTED] I've found a bug with array_rand in PHP 4.2.2; it works in earlier versions, however when tested in newer PHP versions the output never changes. eg. srand ((double)microtime()*1000000); $backgrounds = range (1,28); $rand_keys = array_rand ($backgrounds, 3); print $backgrounds[$rand_keys[0]]."~".$backgrounds[$rand_keys[1]]."~".$backgrounds[$rand_keys[2]]; This would always for me produce the same results for me whatever I try. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19869&edit=1