php.net |  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
Votes:1
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
10 - 7 = ?
Subscribe to this entry?

 
 [2005-10-12 10:08 UTC] fdcxl at 163 dot com
Description:
------------
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:
----------------
2

Actual result:
--------------
Some warning message

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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