PHP mt srand

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : mt_srand() function

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.