Menu Samaritan's Purse

MT_SRAND

Seeds the Mersenne Twister Random Number Generator

Note: There is no need to seed the random number generator with mt_srand() as this is done automatically.

SYNTAX

mt_srand ([ int $seed [, int $mode = MT_RAND_MT19937 ]] ) : void

PARAMETERS

seed

An arbitrary integer seed value.

mode

Use one of the following constants to specify the implementation of the algorithm to use.

CONSTANT DESCRIPTION
MT_RAND_MT19937 Uses the fixed, correct, Mersenne Twister implementation, available as of PHP 7.1.0.
MT_RAND_PHP Uses an incorrect Mersenne Twister implementation which was used as the default up till PHP 7.1.0. This mode is available for backward compatibility.

RETURN

No value is returned.

EXAMPLES

VOID

1266446674

SEED

1453407989

MODE

1453407989

PHP