public static function min(array ...$arrays): array
    {
        self::checkArrayLengths($arrays);

        $number_of_arrays = count($arrays);
        $length_of_arrays = count($arrays[0]);
        $mins             = array_map(
            function ($x) {
                return $x;
            },
            $arrays[0]
        );

        for ($i = 0; $i < $length_of_arrays; $i++) {
            for ($j = 1; $j < $number_of_arrays; $j++) {
                $mins[$i] = min($mins[$i], $arrays[$j][$i]);
            }
        }

        return $mins;
    }