min

(PHP 3, PHP 4 >= 4.0.0)

min -- Find lowest value

Description

number min ( number arg1, number arg2 [, ...])

number min ( array numbers)

min() returns the numerically lowest of the parameter values.

In the first variant, you need at least two parameters and min() returns the lowest of these values. You can compare an unlimited number of values.

In the second variant, min() returns the lowest value in numbers.

If one or more of the values is a float, all the values will be treated as floats, and a float is returned. If none of the values is a float, all of them will be treated as integers, and an integer is returned.