Home >>PHP Math Functions >PHP mt_getrandmax() Function

PHP mt_getrandmax() Function

PHP mt_getrandmax() Function

PHP mt_getrandmax() function is used to get the largest possible value that can be returned by mt_rand() function. It doesn’t takes any input value argument. It returns a numeric value that is the maximum possible value mt_rand() can generate.

Syntax:

  mt_getrandmax();

Here is an example of mt_getrandmax() function in PHP:

<html>
<body>

<?php

echo(mt_getrandmax());

?>

</body>
</html>
Output:
2147483647