note 112316 added to function.rand

From: Date: Fri, 31 May 2013 10:19:43 +0000
Subject: note 112316 added to function.rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-195010@lists.php.net to get a copy of this message
This function returns random boolean. function randomBoolean() { return rand(0, 1) == 1; } According to the manual mt_rand function uses better random number generator. function randomBoolean2() { return mt_rand(0, 1) == 1; } ---- Server IP: 69.147.83.199 Probable Submitter: 94.112.79.28 ---- Manual Page -- http://php.net/manual/en/function.rand.php Edit -- https://master.php.net/note/edit/112316 Del: integrated -- https://master.php.net/note/delete/112316/integrated Del: useless -- https://master.php.net/note/delete/112316/useless Del: bad code -- https://master.php.net/note/delete/112316/bad+code Del: spam -- https://master.php.net/note/delete/112316/spam Del: non-english -- https://master.php.net/note/delete/112316/non-english Del: in docs -- https://master.php.net/note/delete/112316/in+docs Del: other reasons-- https://master.php.net/note/delete/112316 Reject -- https://master.php.net/note/reject/112316 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195010) next »