PHP mt_getrandmax() Function

Definition

The mt_getrandmax() function returns the largest possible value that can be returned by mt_rand().

Syntax

PHP mt_getrandmax() Function has the following syntax.

mt_getrandmax();

Parameter

None

Return

Item Description
Return Value The largest possible value returned by mt_rand()
Return Type Integer

Example

Return largest possible random value that can be returned by mt_rand():


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

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions