|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #34835 levenshtein with 3 parameters does not work as expected
Submitted: 2005-10-12 10:08 UTC Modified: 2021-01-01 16:15 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: fdcxl at 163 dot com Assigned: cmb (profile)
Status: Wont fix Package: Strings related
PHP Version: 5.0.5 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-10-12 10:08 UTC] fdcxl at 163 dot com
levenshtein with 3 parameters does not work.
I have checked the soucecode, it treat the third parameter to be a callback function. While in the manual, it's supposed to be an integer.

Reproduce code:
levenshtein("abc", "abcd", 2);

Expected result:

Actual result:
Some warning message


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-12 10:13 UTC]
And the warning is: "Warning: levenshtein(): The general Levenshtein support is not there yet".
Reclassified as feature request.
 [2016-12-30 23:11 UTC]
-Package: Feature/Change Request +Package: Strings related
 [2021-01-01 16:15 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-01-01 16:15 UTC]
Support for callback parameters is completely removed as of PHP
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 12:01:23 2023 UTC