PHP getrandmax() Function
In this chapter you will learn:
- Definition for PHP getrandmax() Function
- Syntax for PHP getrandmax() Function
- Parameter for PHP getrandmax() Function
- Return for PHP getrandmax() Function
- Example - Return largest possible random value that can be returned by rand()
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.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP hexdec() Function
- Syntax for PHP hexdec() Function
- Parameter for PHP hexdec() Function
- Return for PHP hexdec() Function
- Example - Convert hexadecimal to decimal
Home » PHP Tutorial » PHP Math Functions