php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
Random\Randomizer Class Reference

Public Member Functions

 __construct (?Engine $engine=null)
 
 nextInt ()
 
 nextFloat ()
 
 getFloat (float $min, float $max, IntervalBoundary $boundary=IntervalBoundary::ClosedOpen)
 
 getInt (int $min, int $max)
 
 getBytes (int $length)
 
 getBytesFromString (string $string, int $length)
 
 shuffleArray (array $array)
 
 shuffleBytes (string $bytes)
 
 pickArrayKeys (array $array, int $num)
 
 __serialize ()
 
 __unserialize (array $data)
 

Data Fields

readonly Engine $engine
 

Detailed Description

@strict-properties

Definition at line 129 of file random.stub.php.

Constructor & Destructor Documentation

◆ __construct()

Random\Randomizer::__construct ( ?Engine $engine = null)

Definition at line 133 of file random.stub.php.

Member Function Documentation

◆ __serialize()

Random\Randomizer::__serialize ( )

Definition at line 153 of file random.stub.php.

◆ __unserialize()

Random\Randomizer::__unserialize ( array $data)

Definition at line 155 of file random.stub.php.

◆ getBytes()

Random\Randomizer::getBytes ( int $length)

Definition at line 143 of file random.stub.php.

◆ getBytesFromString()

Random\Randomizer::getBytesFromString ( string $string,
int $length )

Definition at line 145 of file random.stub.php.

◆ getFloat()

Random\Randomizer::getFloat ( float $min,
float $max,
IntervalBoundary $boundary = IntervalBoundary::ClosedOpen )

Definition at line 139 of file random.stub.php.

◆ getInt()

Random\Randomizer::getInt ( int $min,
int $max )

Definition at line 141 of file random.stub.php.

◆ nextFloat()

Random\Randomizer::nextFloat ( )

Definition at line 137 of file random.stub.php.

◆ nextInt()

Random\Randomizer::nextInt ( )

Definition at line 135 of file random.stub.php.

◆ pickArrayKeys()

Random\Randomizer::pickArrayKeys ( array $array,
int $num )

Definition at line 151 of file random.stub.php.

◆ shuffleArray()

Random\Randomizer::shuffleArray ( array $array)

Definition at line 147 of file random.stub.php.

◆ shuffleBytes()

Random\Randomizer::shuffleBytes ( string $bytes)

Definition at line 149 of file random.stub.php.

Field Documentation

◆ $engine

readonly Engine Random\Randomizer::$engine

Definition at line 131 of file random.stub.php.


The documentation for this class was generated from the following file: