minFind lowest value
&reftitle.description;
mixedminmixedvaluemixedvaluesAlternative signature (not supported with named arguments):mixedminarrayvalue_array
If the first and only parameter is an array, min
returns the lowest value in that array. If at least two parameters are
provided, min returns the smallest of these values.
Values of different types will be compared using the
standard comparison rules. For instance, a non-numeric string will be
compared to an int as though it were 0, but multiple non-numeric
string values will be compared alphanumerically. The actual value returned will be of the
original type with no conversion applied.
Be careful when passing arguments of different types because
min can produce unpredictable results.
&reftitle.parameters;
value
Any comparable
value.
values
Any comparable
values.
value_array
An array containing the values.
&reftitle.returnvalues;
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.
&reftitle.errors;
If an empty array is passed, min throws a ValueError.
&reftitle.changelog;
&Version;&Description;8.0.0min throws a ValueError on failure now;
previously, &false; was returned and an E_WARNING error was emitted.
8.0.0
As
string to number comparisons were changed,
min no longer returns a
different value based on the argument order in those cases.
&reftitle.examples;
Example uses of min
]]>
&reftitle.seealso;
maxcount