rfc:object_scope_prng
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
rfc:object_scope_prng [2021/03/23 14:16] zeriyoshi fiber |
rfc:object_scope_prng [2021/04/14 14:38] (current) zeriyoshi status update |
||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2020-12-20 | * Date: 2020-12-20 | ||
* Author: Go Kudo < | * Author: Go Kudo < | ||
- | * Status: | + | * Status: |
* Implementation: | * Implementation: | ||
* First Published at: https:// | * First Published at: https:// | ||
Line 156: | Line 156: | ||
namespace RNG; | namespace RNG; | ||
- | class XorShift128Plus implements RNGInterface | + | class XorShift128Plus implements RNGInterface // Fast modern PRNG. |
- | class MT19937 implements RNGInterface | + | { |
- | class OS implements RNGInterface | + | public function __construct(int $seed) {} |
+ | public function next(): int {} | ||
+ | public function next64(): int {} | ||
+ | public function __serialize(): | ||
+ | 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(): | ||
+ | public function __unserialize(array $data): void {} | ||
+ | } | ||
+ | |||
+ | class OS implements RNGInterface | ||
+ | { | ||
+ | public function next(): int {} | ||
+ | public function next64(): int {} | ||
+ | } | ||
</ | </ | ||
Line 255: | Line 275: | ||
* mt_rand() | * mt_rand() | ||
- | ===== Proposed Voting Choices | + | ===== Vote ===== |
- | Yes/No, requiring | + | 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=" | + | <doodle title=" |
* Yes | * Yes | ||
* No | * No |
rfc/object_scope_prng.1616508993.txt.gz · Last modified: 2021/03/23 14:16 by zeriyoshi