srand

Syntax

void srand(int seed);

Popis

Príkaz jazyka PHP
srand - seed the random number generator

Seeds the random number generator with seed.

Príklad

// seed with microseconds since last "whole" second
srand((double)microtime()*1000000);
$randval = rand();


Pozri aj

rand, getrandmax, mt_rand, mt_srand, mt_getrandmax