w3resource

PHP: getrandmax() function

Description

The getrandmax() function is used to get the largest possible random value.

Version:

(PHP 4 and above)

Syntax:

getrandmax()

Return value:

The largest possible random value returned by rand().

Value Type: Integer.

Example:

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

Output:

2147483647

View the example in the browser

See also

PHP Function Reference

Previous: floor
Next: hexdec



Follow us on Facebook and Twitter for latest update.