RE: [PHP] seeding using mt_srand();

From: Date: Wed, 16 Oct 2002 12:39:57 +0000
Subject: RE: [PHP] seeding using mt_srand();
Groups: php.general 
Request: Send a blank email to php-general+get-120176@lists.php.net to get a copy of this message
Hi Phil, > How often do you need to call mt_srand(); ? As of version 4.2.0 you don't have to call it at all. If your PHP installation is an earlier version than that, call it once per script, before generating any random numbers, e.g: mt_srand($seed); $randomA = mt_rand(); $randomB = mt_rand(); $randomC = mt_rand(); > Just once? Or each time the page gets reloaded? Uh... same thing, surely? Cheers Jon

« previous php.general (#120176) next »