← All built-ins / max()

max()

max(...$numbers): mixed

Parameters

NameTypeDescription
$...mixednumbers or a single array

Return value

The largest value.

Example

echo max(3, 7, 5), "
";
echo max([2, 9, 4]), "
";
7
9

See also

min()array_sum()