|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16672 Problem in levenshtein
Submitted: 2002-04-17 18:32 UTC Modified: 2002-04-18 16:18 UTC
From: manger_dormir at hotmail dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 4.1.2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: manger_dormir at hotmail dot com
New email:
PHP Version: OS:


 [2002-04-17 18:32 UTC] manger_dormir at hotmail dot com

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

<? echo "lev = ".levenshtein("kdos", "ls"); ?> prints lev = 2

whereas in the first case, I expect 2 and in the second, 3.

that's it.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-18 06:13 UTC]
duplicate of #16473, fixed in CVS
 [2002-04-18 16:18 UTC]
closed then..

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Nov 30 18:01:27 2023 UTC