|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-01 03:08 UTC] derick@php.net
[2002-05-01 05:06 UTC] joseppo at hotmail dot com
[2002-05-01 12:39 UTC] rodif_bl@php.net
[2002-06-18 19:55 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 21 03:00:01 2025 UTC |
As of PHP 4.2.0, shuffle() doesn't seem to work for me. The following code always produce the same output: function make_seed() { // Taken directly from the manual list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed()); $arr = range(1, 10); shuffle($arr); print_r($arr); Further testing shows that I get the same output if I uncomment the srand(), if that's any help.