PHP mt_getrandmax()Functions

PHP Math 参考手册PHP Math Reference Manual

Examples

Returns the maximum possible value of the random number displayed by calling the mt_rand() function:

<?php
echo(mt_getrandmax());
?>

Run example »

Definition and Usage

The mt_getrandmax() function returns the maximum possible value of the random number displayed by callingmt_rand()the function.


Syntax

mt_getrandmax();

Technical Details

Return value: The maximum possible value of the random number displayed by calling the mt_rand() function:
Return type: Integer
PHP version: 4+


PHP Math 参考手册PHP Math Reference Manual Other Extensions