The Random\Randomizer class

Introduction

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

Class synopsis

Random
final Randomizer
/* Properties */
public readonly Random\Engine $engine;
/* Methods */
public Random\Randomizer::__construct(Random\Enginenull $engine = null)
public string Random\Randomizer::getBytes(int $length)
public string Random\Randomizer::getBytesFromString(string $string, int $length)
public float Random\Randomizer::getFloat(float $min, float $max, Random\IntervalBoundary $boundary = Random\IntervalBoundary::ClosedOpen)
public int Random\Randomizer::getInt(int $min, int $max)
public float Random\Randomizer::nextFloat()
public int Random\Randomizer::nextInt()
public array Random\Randomizer::pickArrayKeys(array $array, int $num)
public array Random\Randomizer::__serialize()
public array Random\Randomizer::shuffleArray(array $array)
public string Random\Randomizer::shuffleBytes(string $bytes)
public void Random\Randomizer::__unserialize(array $data)

Properties

engine

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

Table of Contents