min

PHP 4, PHP 5, PHP 7, PHP 8
min - Find lowest value

min( mixed$value, ... mixed$values ): mixed

Alternative signature (not supported with named arguments):

mixedmin arrayvalue_array

Parameters

value

Any comparable value.

values

Any comparable values.

value_array

An array containing the values.

Return Values

min returns the parameter value considered "lowest" according to standard comparisons. If multiple values of different types evaluate as equal (e.g. 0 and 'abc') the first provided to the function will be returned.

If an empty array is passed, then false will be returned and an E_WARNING error will be emitted.

Related Functions

Example of min

Show all examples for min

PHP Version:


Function min:

Mathematical Functions Functions

Most used PHP functions