Easy Tutorial
❮ Func Math Min Func Filesystem Basename ❯

PHP max() Function

PHP Math Reference Manual

Example

Finding the maximum value using the max() function:


Definition and Usage

The max() function returns the maximum value in an array, or the highest value among specified values.


Syntax

Parameter Description
array_values Required. Specifies an array containing values.
value1, value2, ... Required. Specifies the values to compare (at least two values).

Technical Details

Return Value: The maximum numeric value.
Return Type: Mixed
--- ---
PHP Version: 4+
--- ---
❮ Func Math Min Func Filesystem Basename ❯