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

PHP getrandmax() Function

PHP getrandmax() Function

PHP getrandmax() function is used to get the largest possible value that can be returned by rand() function. It doesn’t take any parameter value. The rand() function randomly returns a number and getrandmax() function returns the largest possible number generated by the rand().

Syntax:

  Syntax:  getrandmax();

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

<html>
<body>

<?php

echo getrandmax() ;

?>

</body>
</html>
Output:
2147483647