PHP 7.0.0 Beta 2 Released

mt_getrandmax

(PHP 4, PHP 5)

mt_getrandmaxMostra il più grande valore casuale disponibile

Descrizione

int mt_getrandmax ( void )

Restituisce il massimo valore che può essere restituito da una chiamata alla funzione mt_rand().

Vedere anche mt_rand(), mt_srand() e getrandmax().

add a note add a note

User Contributed Notes 4 notes

up
16
marcus at synchromedia dot co dot uk
3 years ago
On both 32 and 64-bit systems (OS X and Linux), mt_getrandmax() returns 2147483647 for me, i.e. ~2^31.
up
11
Anonymous
2 years ago
The max on a Windows 7 x64 machine is also 2147483647.
up
4
pablorodriguez85 at gmail dot com
7 months ago
In a Mac OS X 10-9-5 the value is also 2147483647
up
1
bishop at php dot net
18 days ago
The upper-bound of this value is platform-independent.  PHP implements the 32-bit version of the Mersenne Twister ("mt"), so the maximum possible value is 2**31 - 1 (2147483647).
To Top