PHP getrandmax() Function

Definition

The getrandmax() function returns the largest possible value that can be returned by rand().

Syntax

PHP getrandmax() Function has the following syntax.

getrandmax();

Parameter

None

Return

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

Example

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


<?php
echo(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