« srand
Random\Randomizer::__construct »

Random\Randomizer クラス

(PHP 8 >= 8.2.0)

はじめに

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

クラス概要

namespace Random;
final class Randomizer {
/* プロパティ */
public readonly Random\Engine $engine;
/* メソッド */
public function __construct(?Random\Engine $engine = null)
public function getBytes(int $length): string
public function getBytesFromString(string $string, int $length): string
public function getFloat(float $min, float $max, Random\IntervalBoundary $boundary = Random\IntervalBoundary::ClosedOpen): float
public function getInt(int $min, int $max): int
public function nextFloat(): float
public function nextInt(): int
public function pickArrayKeys(array $array, int $num): array
public function __serialize(): array
public function shuffleArray(array $array): array
public function shuffleBytes(string $bytes): string
public function __unserialize(array $data): void
}

プロパティ

engine

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

目次

関連キーワード:
Random   Randomizer   float   ランダム   construct   Engine   engine   バイト   提供   プロパティ   getBytes   length   getBytesFromString   getFloat   IntervalBoundary   getInt   nextFloat   nextInt   pickArrayKeys   serialize   shuffleArray   shuffleBytes   unserialize   確率   整数
関連する関数・ページ:
random-randomizer.construct   random-randomizer.getbytes   random-randomizer.getint   random-randomizer.nextint   random-randomizer.serialize   random-randomizer.unserialize