A min_by function:
<?php
function min_by(Array $arr, Callable $func){
$mapped = array_map($func, $arr);
return $arr[array_search(min($mapped), $mapped)];
}
$a = ["albatross", "dog", "horse"];
echo min_by($a, "strlen"); // dog
?>