From: [EMAIL PROTECTED] Operating system: PHP version: 4.0.4pl1 PHP Bug Type: *Function Specific Bug description: bug in weighted Levenshtein distance function In function: static int weighted_levdist There is a block of code: 118 /* if we already used up one string, then 119 the result is the length of the other */ 120 if(*s1=='\0') return strlen(s2); 121 if(*s2=='\0') return strlen(s1); This is correct for unweighted, but not weighted Levenshtein. The value on line 120 should be multiplied by cost_ins, and the value on line 121 should be multiplied by cost_del. Steven Bird <[EMAIL PROTECTED]> http://www.ldc.upenn.edu/sb/ -- Edit Bug report at: http://bugs.php.net/?id=9080&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]