public static function min_with_key($array, $key){
    if (!\is_array($array) || \count($array) == 0) return false;
    $min = $array[0][$key];
    foreach($array as $a){
      if($a[$key] < $min){
        $min = $a[$key];
      }
    }
    return $min;
  }