★ wanayoo — archive 1999 http://www.php.net/manual/function.srand.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Math.
Quick Reference
Math.
* Abs
* Acos
* Asin
* Atan
* Atan2
* base_convert
* BinDec
* Ceil
* Cos
* DecBin
* DecHex
* DecOct
* Exp
* Floor
* getrandmax
* HexDec
* Log
* Log10
* max
* min
* mt_rand
* mt_srand
* mt_getrandmax
* number_format
* OctDec
* pi
* pow
* rand
* round
* Sin
* Sqrt
* srand
* Tan
Manual: srand
View the source code for this pageSearch the site



Previous page
 Sqrt
Tan 
Next page


srand

srand -- seed the random number generator

Description

void srand(int seed);

Seeds the random number generator with seed.

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

See also rand(), getrandmax(), mt_rand(), mt_srand() and mt_getrandmax().


 About Notes


Previous page
 Sqrt
Tan 
Next page



Site Statistics


Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.