note 51274 added to function.usleep

From: Date: Fri, 25 Mar 2005 12:28:22 +0000
Subject: note 51274 added to function.usleep
Groups: php.notes 
Request: Send a blank email to php-notes+get-86968@lists.php.net to get a copy of this message
Just a tip for the folks at home: is you use multiple rand() functions in your code, be sure to put a randomized usleep() in between the rand() codelines, or else your "random" seeds won't be so random on a fast server. Example: $string = rand(0, 100); $string = rand(0, 200); Instead: $string = rand(0, 100); usleep(rand(1000, 10000)); $string1 = rand(0, 100); ---- Manual Page -- http://www.php.net/manual/en/function.usleep.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51274 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51274&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51274&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51274&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51274&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51274&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51274&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86968) next »