srand and array_rand do not function properly on Win32
| From: | sKreeM | Date: | Tue, 01 Oct 2002 11:42:18 +0000 |
| Subject: | srand and array_rand do not function properly on Win32 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16104@lists.php.net to get a copy of this message | ||
my code:
srand ((float) microtime() * 10000000);
return array_rand($lines,100);
The returned array is ALWAYS in the same order. I'm running PHP 4.2.3 and
Apache/2.0.39
Does anyone have a solution or a workaround for this problem?
The script works fine on a UNIX server.