(PHP 8 >= 8.2.0)
Random\Engine\Secure::generate — Generate cryptographically secure randomness
Returns cryptographically secure randomness.
此函数使用的随机性来源如下:
此函数没有参数。
A string containing PHP_INT_SIZE
cryptographically secure random bytes.
示例 #1 Random\Engine\Secure::generate() example
<?php
/* ... */
?>
以上例程的输出类似于:
...