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



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/php/function-reference/getrandmax.php