How does PHP handle non-numeric values when using the min() function?

When using the min() function in PHP, non-numeric values are treated as 0. This means that if the array passed to the min() function contains non-numeric values, they will be ignored and the function will return the minimum numeric value in the array. To handle non-numeric values in a more flexible way, you can filter out non-numeric values from the array before passing it to the min() function.

$array = [10, 'abc', 5, 'def', 3];
$numericArray = array_filter($array, 'is_numeric');
$minValue = min($numericArray);

echo $minValue;