note 70207 added to function.mt-getrandmax

From: Date: Fri, 06 Oct 2006 17:59:19 +0000
Subject: note 70207 added to function.mt-getrandmax
Groups: php.notes 
Request: Send a blank email to php-notes+get-118141@lists.php.net to get a copy of this message
Alt way? <? function mt_getrandmax2() { $cur = 0; for ($i = 1; ; $i++) { $cur = mt_rand($i, $i+); if (!is_numeric($cur)) { break; } // if... } // for... return $cur; } // function ?> Or you can set $i (at for loop) to some big number, like 999999 to make it faster. This will, at any form, require good computer strength. ---- Server IP: 216.194.113.175 Probable Submitter: 195.29.70.122 ---- Manual Page -- http://www.php.net/manual/en/function.mt-getrandmax.php Edit -- https://master.php.net/note/edit/70207 Del: integrated -- https://master.php.net/note/delete/70207/integrated Del: useless -- https://master.php.net/note/delete/70207/useless Del: bad code -- https://master.php.net/note/delete/70207/bad+code Del: spam -- https://master.php.net/note/delete/70207/spam Del: non-english -- https://master.php.net/note/delete/70207/non-english Del: in docs -- https://master.php.net/note/delete/70207/in+docs Del: other reasons-- https://master.php.net/note/delete/70207 Reject -- https://master.php.net/note/reject/70207 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118141) next »