This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Ideal Levenshtein comparison from 0 to 100: 0 being the most similar, 100 being the least | |
| */ | |
| function levenshteinDistance($str1, $str2) { | |
| $len1 = mb_strlen($str1); | |
| $len2 = mb_strlen($str2); | |
| // strip common prefix | |
| $i = 0; | |
| do { |