Menu Samaritan's Purse

MIN

Find lowest value

SYNTAX

min ( array $values ) : mixed
min ( mixed $value1 [, mixed $... ] ) : mixed

PARAMETERS

values

An array containing the values.

value1

Any comparable value.

...

Any comparable value.

RETURN

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.

EXAMPLES

VALUES

1

VALUE1 ...

1

FIRST

int(0)

FIRST

int(1)

FIRST

0

LENGTH

Array
(
    [0] => 3
    [1] => 2
)

LEFT TO RIGHT

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)

PHP