rfc:use-php_mt_rand

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:use-php_mt_rand [2014/07/16 22:58] yohgakirfc:use-php_mt_rand [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== PHP RFC: Your Title Here ======+====== PHP RFC: Use php_mt_rand() instead of php_rand() ======
   * Version: 0.9   * Version: 0.9
   * Date Created: 2014-07-17   * Date Created: 2014-07-17
   * Author: Yasuo Ohgaki, yohgaki@php.net   * Author: Yasuo Ohgaki, yohgaki@php.net
-  * Status: Draft (or Under Discussion or Accepted or Declined)+  * Status: Withdrawn
   * First Published at: http://wiki.php.net/rfc/use-php_mt_rand   * First Published at: http://wiki.php.net/rfc/use-php_mt_rand
 +
 +https://wiki.php.net/rfc/rng_fixes tooke care of this RFC. Withdrawn.
  
 ===== Introduction ===== ===== Introduction =====
 Both php_rand() and php_mt_rand() internal function provides pseudo random numbers. php_rand() uses system random function which has less randomness compare to MT rand. There are few places that use php_rand() currently. Both php_rand() and php_mt_rand() internal function provides pseudo random numbers. php_rand() uses system random function which has less randomness compare to MT rand. There are few places that use php_rand() currently.
  
-  * https://bugs.php.net/bug.php?id=66718 
   * http://lxr.php.net/search?q=php_rand&defs=&refs=&path=&hist=&project=PHP_5_5   * http://lxr.php.net/search?q=php_rand&defs=&refs=&path=&hist=&project=PHP_5_5
  
Line 25: Line 26:
   - Use php_mt_rand()/php_mt_srand() for rand()/srand() PHP function.   - Use php_mt_rand()/php_mt_srand() for rand()/srand() PHP function.
   - Rename rand()/srand() to rand_XXX()/srand_XXX() - name is TBD.   - Rename rand()/srand() to rand_XXX()/srand_XXX() - name is TBD.
 +
 +Note: rand() (or rand_XXX) uses php_rand(), NOT php_mt_rand().
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
Line 80: Line 83:
 VOTE: 2014/XX/XX - 2014/XX/XX VOTE: 2014/XX/XX - 2014/XX/XX
    
-<doodle title="Use php_mt_rand(): Proposal 1 to 4" auth="yohgaki" voteType="single" closed="true">+If you agree to apply stronger pseudo random number, please vote 'yes'
 +<doodle title="Use php_mt_rand(): Proposal 1 to 3" auth="yohgaki" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle> 
 + 
 + \\ If you would like to have MT rand for rand() function, please vote 'yes'
 +<doodle title="Use php_mt_rand() for rand() function: Proposal 4" auth="yohgaki" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
 </doodle> </doodle>
  
 + \\ Please choose 'yes' or 'no' even if you vote 'no' for previous.
 <doodle title="Rename rand(): Proposal 5" auth="yohgaki" voteType="single" closed="true"> <doodle title="Rename rand(): Proposal 5" auth="yohgaki" voteType="single" closed="true">
    * Yes    * Yes
rfc/use-php_mt_rand.1405551482.txt.gz · Last modified: 2017/09/22 13:28 (external edit)