Menu Home

getrandmax

osbo.com | PHP | Functions | getrandmax

Show largest possible random value

Syntax

getrandmax ( void ) : int

Return

The largest possible random value returned by rand()

Examples

1

<?

$return = getrandmax();

echo $return;

?>
2147483647

2

<?

$return = getrandmax();

$randmin = 0;
$randmax = $return;

$randreturn = rand($randmin, $randmax);

echo $randreturn;

?>
1093735939

PHP