rfc:object_scope_prng

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
rfc:object_scope_prng [2021/03/23 14:16]
zeriyoshi fiber
rfc:object_scope_prng [2021/04/14 12:12]
zeriyoshi close vote
Line 3: Line 3:
   * Date: 2020-12-20   * Date: 2020-12-20
   * Author: Go Kudo <zeriyoshi@gmail.com>   * Author: Go Kudo <zeriyoshi@gmail.com>
-  * Status: Under Discussion+  * Status: Voting
   * Implementation: https://github.com/php/php-src/pull/6568   * Implementation: https://github.com/php/php-src/pull/6568
   * First Published at: https://wiki.php.net/rfc/object_scope_prng   * First Published at: https://wiki.php.net/rfc/object_scope_prng
Line 156: Line 156:
 namespace RNG; namespace RNG;
  
-class XorShift128Plus implements RNGInterface {} // Fast modern PRNG. +class XorShift128Plus implements RNGInterface // Fast modern PRNG. 
-class MT19937 implements RNGInterface {} // Completely consistent \mt_srand() and \mt_rand() implementation. +
-class OS implements RNGInterface {} // Cryptographically Secure PRNG.+    public function __construct(int $seed) {} 
 +    public function next(): int {} 
 +    public function next64(): int {} 
 +    public function __serialize(): array {} 
 +    public function __unserialize(array $data): void {} 
 +
 + 
 +class MT19937 implements RNGInterface // Completely consistent \mt_srand() and \mt_rand() implementation. 
 +
 +    public function __construct(int $seed) {} 
 +    public function next(): int {} 
 +    public function next64(): int {} 
 +    public function __serialize(): array {} 
 +    public function __unserialize(array $data): void {} 
 +
 + 
 +class OS implements RNGInterface // // Cryptographically Secure PRNG. 
 +
 +    public function next(): int {} 
 +    public function next64(): int {} 
 +}
 </code> </code>
  
Line 255: Line 275:
   * mt_rand()   * mt_rand()
  
-===== Proposed Voting Choices ===== +===== Vote ===== 
-Yes/No, requiring 2/3 majority +Voting opens 2021-04-01 and 2021-04-15 at 00:00:00 EDT. 2/3 required to accept.
- +
-There are a few additional options for implementation.+
  
-<doodle title="Add object-scoped RNG" auth="user" voteType="single" closed="true">+<doodle title="Add object-scoped RNG" auth="zeriyoshi" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
rfc/object_scope_prng.txt · Last modified: 2021/04/14 14:38 by zeriyoshi