Bug #16672: Problem in levenshtein

From: Date: Wed, 17 Apr 2002 22:33:00 +0000
Subject: Bug #16672: Problem in levenshtein
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5244@lists.php.net to get a copy of this message
From: manger_dormir@hotmail.com Operating system: linux PHP version: 4.1.2 PHP Bug Type: Strings related Bug description: Problem in levenshtein Hi!! I've got a little problem with the levenshtein function. There is a particular case where the returned value is not correct. I tried it with 4.0.6 and 4.1.2. when the differences are at the beginning, the returned value is one less than what I expected. For example : <? echo "lev = ".levenshtein("kdos", "los");?> prints lev = 1 and <? echo "lev = ".levenshtein("kdos", "ls"); ?> prints lev = 2 whereas in the first case, I expect 2 and in the second, 3. that's it. Thanx!! -- Edit bug report at http://bugs.php.net/?id=16672&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16672&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16672&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16672&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16672&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16672&r=support Expected behavior: http://bugs.php.net/fix.php?id=16672&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16672&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16672&r=submittedtwice

« previous php.bugs (#5244) next »