CakeFest 2024: The Official CakePHP Conference

Random\Randomizer クラス

(PHP 8 >= 8.2.0)

はじめに

Random\Engine が提供するランダムな値に対する、高レベルインターフェイスを提供します。

クラス概要

final class Random\Randomizer {
/* プロパティ */
public readonly Random\Engine $engine;
/* メソッド */
public __construct(?Random\Engine $engine = null)
public getBytes(int $length): string
public getBytesFromString(string $string, int $length): string
public getFloat(float $min, float $max, Random\IntervalBoundary $boundary = Random\IntervalBoundary::ClosedOpen): float
public getInt(int $min, int $max): int
public nextFloat(): float
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
}

プロパティ

engine

Random\Randomizer のメソッドに与えるランダムな値の、低レベルのソース。

目次

add a note

User Contributed Notes

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