random_int

Supported Versions: PHP 7, PHP 8
Get a cryptographically secure, uniformly selected integer
<?php random_int(int $min, int $max): int