mt_srand
Seed the better random number generator
&reftitle.description;
voidmt_srand
intseed
Seeds the random number generator with
seed or with a random value
if no seed is given.
¬e.randomseed;
&reftitle.parameters;
seed
An optional seed value
&reftitle.returnvalues;
&return.void;
&reftitle.changelog;
&Version;
&Description;
4.2.0
The seed becomes optional
and defaults to a random value if omitted.
5.2.1
The Mersenne Twister implementation in PHP now uses a new seeding
algorithm by Richard Wagner. Identical seeds no longer produce the same
sequence of values they did in previous versions. This behavior is not
expected to change again, but it is considered unsafe to rely upon it
nonetheless.
&reftitle.examples;
mt_srand example
]]>
&reftitle.seealso;
mt_rand
mt_getrandmax
srand