[php-src] Issue #9415: Randomizer::getInt(0, 2**32 - 1) with Mt19937 always returns 1
| From: | TimWolla | Date: | Wed, 24 Aug 2022 10:32:42 +0000 |
| Subject: | [php-src] Issue #9415: Randomizer::getInt(0, 2**32 - 1) with Mt19937 always returns 1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242301@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9415
Author: TimWolla
### Description
The following code:
```php
<?php
$r = new Random\Randomizer(new Random\Engine\Mt19937());
var_dump($r->getInt(0, 2**32 - 1));
```
Resulted in this output:
```
int(1)
```
But I expected this output instead:
Not always 1.
### PHP Version
Current git master
### Operating System
_No response_