mt_rand
<<<
mt_srand OctDec
>>>

6.51 Mathématiques
6 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes Prédefinies
Abs
Acos
acosh
Asin
asinh
Atan
Atan2
atanh
base_convert
BinDec
Ceil
Cos
cosh
DecBin
DecHex
DecOct
deg2rad
Exp
expm1
Floor
fmod
getrandmax
hexdec
hypot
is_finite
is_infinite
is_nan
lcg_value
Log
Log10
log1p
max
min
mt_getrandmax
mt_rand
->mt_srand
OctDec
pi
pow
rad2deg
rand
round
Sin
sinh
Sqrt
srand
Tan
tanh

6.51.42 mt_srand()Initialise une meilleure valeur aléatoire

[ Exemples avec mt_srand ]   PHP 3>= 3.0.6, PHP 4

void  mt_srand ( int   seed )

mt_srand initialise une meilleure valeur aléatoire avec seed .

<?php
// initialise avec les microsecondes depuis la dernière seconde entière
  
mt_srand((float) microtime()*1000000);
  
$randval = mt_rand();
?>

Voir aussi mt_rand , mt_getrandmax , srand , rand et getrandmax .

<< mt_srand >>
mt_rand Mathématiques OctDec