w3resource logo


PHP mt_srand function

PHP : mt_srand() function

<<PreviousNext>>

Description

The mt_srand() function seeds the random number generator with seed or with a random value if no seed is given.

Version

(PHP 4 and above)

Syntax

mt_srand(num)

Parameter

Name Description Required /
Optional
Type
num An optional seed value. Optional Integer

Return value

No return value.

Value Type : Integer.

See also

PHP Function Reference

<<PreviousNext>>

Rate this tutorial


Your Rating: not set

Share this tutorial

RSS Feed