#48011 [Fbk->Opn]: levenshtein second variant fails
| From: | joris at bonboa dot com | Date: | Sat, 18 Apr 2009 13:29:09 +0000 |
| Subject: | #48011 [Fbk->Opn]: levenshtein second variant fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135949@lists.php.net to get a copy of this message | ||
ID: 48011
User updated by: joris at bonboa dot com
Reported By: joris at bonboa dot com
-Status: Feedback
+Status: Open
Bug Type: Strings related
-Operating System: Mac OS X
+Operating System: Linux
-PHP Version: 5.2.5
+PHP Version: 5.2.6-1
New Comment:
Here on a Linux box using PHP 5.2.6-1 same problem
Previous Comments:
------------------------------------------------------------------------
[2009-04-18 13:00:56] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2009-04-18 10:32:36] joris at bonboa dot com
My PHP version = 5.2.5
------------------------------------------------------------------------
[2009-04-18 10:22:24] joris at bonboa dot com
Description:
------------
Does de second variant of the levenshtein function actuall work?
The second output line I dig, but not the first.
Any idea?
Reproduce code:
---------------
---
From manual page: function.levenshtein
---
$i=0;
$u=0;
$d=0;
$t1='Joris';
$t2='oris';
$l=levenshtein($t1,$t2,$i,$u,$d);
echo $t1.'='.$t2.'
'.$l.':'.$i.':'.$u.':'.$d."\n";
$l=levenshtein($t1,$t2);
echo $t1.'='.$t2.' '.$l."\n";
Expected result:
----------------
Joris=oris 1:0:0:1
Joris=oris 1
Actual result:
--------------
Joris=oris 0:0:0:0
Joris=oris 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48011&edit=1