PHP 8.1.15 Released!

The Random\Randomizer class

(PHP 8 >= 8.2.0)

Introdução

Provides a high-level API to the randomness provided by an Random\Engine.

Sinopse da classe

final class Random\Randomizer {
/* Propriedades */
public readonly Random\Engine $engine;
/* Métodos */
public __construct(?Random\Engine $engine = null)
public getBytes(int $length): string
public getInt(int $min, int $max): int
public nextInt(): int
public pickArrayKeys(array $array, int $num): array
public __serialize(): array
public shuffleArray(array $array): array
public shuffleBytes(string $bytes): string
public __unserialize(array $data): void
}

Propriedades

engine

The low-level source of randomness for the Random\Randomizer’s methods.

Índice

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top