rfc:use-php_mt_rand
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:use-php_mt_rand [2014/07/16 22:58] – yohgaki | rfc: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: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
+ | |||
+ | https:// | ||
===== 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:// | ||
* http:// | * http:// | ||
Line 25: | Line 26: | ||
- Use php_mt_rand()/ | - Use php_mt_rand()/ | ||
- Rename rand()/ | - Rename rand()/ | ||
+ | |||
+ | 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=" | + | If you agree to apply stronger pseudo random number, please vote ' |
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | \\ If you would like to have MT rand for rand() function, please vote ' | ||
+ | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
+ | \\ Please choose ' | ||
<doodle title=" | <doodle title=" | ||
* Yes | * Yes |
rfc/use-php_mt_rand.1405551482.txt.gz · Last modified: 2017/09/22 13:28 (external edit)