|
maxFind highest value Description
mixed max(mixed
$value , mixed ...$values )Alternative signature (not supported with named arguments): mixed max(array
$value_array )If the first and only parameter is an array, max returns the highest value in that array. If at least two parameters are provided, max returns the biggest of these values.
Caution
Be careful when passing arguments of different types because max can produce unpredictable results. Parameters
Return Values
max returns the parameter value considered "highest" according to standard
comparisons. If multiple values of different types evaluate as equal (e.g. Errors/ExceptionsIf an empty array is passed, max throws a ValueError. Changelog
Examples
Example #1 Example uses of max
See Also
|