public static function levenshtein($word, $words, $order = SORT_ASC, $sort_flags = SORT_REGULAR)
    {
        foreach ($words as $w) {
            $result[$w] = levenshtein($word, $w);
        }

        if ($order & SORT_DESC) {
            arsort($result, $sort_flags);
        } else {
            asort($result, $sort_flags);
        }

        return $result;
    }