Random\Engine\PcgOneseq128XslRr64::__construct

(PHP 8 >= 8.2.0)

Random\Engine\PcgOneseq128XslRr64::__constructConstructs a new PCG Oneseq 128 XSL RR 64 engine

说明

public Random\Engine\PcgOneseq128XslRr64::__construct(string|int|null $seed = null)

警告

本函数还未编写文档,仅有参数列表。

参数

seed

How the internal 128 bit (16 byte) state consisting of one unsigned 128 bit integer is seeded depends on the type used as the seed.

Type 说明
null Fills the state with 16 random bytes generated using the CSPRNG.
int Fills the state by setting the state to 0, advancing the engine one step, adding the value of seed interpreted as an unsigned 64 bit integer, and advancing the engine another step.
string Fills the state by interpreting a 16 byte string as a little-endian unsigned 128 bit integer.

错误/异常

  • If the length of a string seed is not 16 bytes, a ValueError will be thrown.

范例

示例 #1 Random\Engine\PcgOneseq128XslRr64::__construct() example

<?php

/* ... */

?>

以上例程的输出类似于:

...