MersenneTwister

Custom random algorithm to get consistent behaviour between PHP versions.

package

Default

Methods

__construct

__construct(integer $seed = null) 

Arguments

$seed

integer

generateTwister

generateTwister() 

getInstance

getInstance() : \ls\mersenne\MersenneTwister
static

getNext

getNext(integer $min = null, integer $max = null) 

Arguments

$min

integer

$max

integer

init

init(integer $seed) : void
static

Arguments

$seed

integer

setSeed

setSeed( $seed) 

Arguments

$seed

Shuffle with seed

shuffle(array $arr) : array

Arguments

$arr

array

Response

array

Properties

state

state : 

Type(s)

index

index : 

Type(s)

Singleton variable

instance : \ls\mersenne\MersenneTwister
static