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

PHP Home Page

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



Previous page
 Sqrt
 Updated
Sat, 12 Aug 2000
Tan 
Next page


srand

(PHP3 , PHP4 )

srand -- Startwert für den Zufallsgenerator festlegen

Beschreibung

void srand (int seed)

Legt einen internen Startwert für den Zufallsgenerator in rand() fest. Gleiche Startwerte führen auch jeweils zu derselben Pseudo-Zufallssequenzen daher ist es üblich, diese über die aktuelle Uhrzeit festzulegen:


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

Siehe auch rand(), getrandmax(), mt_rand(), mt_srand() und mt_getrandmax().


 About Notes


Previous page
 Sqrt
 Updated
Sat, 12 Aug 2000
Tan 
Next page





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.