levenshtein

Definition

int levenshtein ( string $str1 , string $str2 )

Description

The Levenshtein distance is defined as the minimal number of characters you have to replace, insert or delete to transform str1 into str2. The complexity of the algorithm is O(m*n), where n and m are the length of str1 and str2 (rather good when compared to similar_text(), which is O(max(n,m)**3), but still expensive).

[More at php.net]

Parameters



loading


Share/bookmark - levenshtein


Global comments