#48011 [Opn->Fbk]: levenshtein second variant fails

From: Date: Sat, 18 Apr 2009 13:00:56 +0000
Subject: #48011 [Opn->Fbk]: levenshtein second variant fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135948@lists.php.net to get a copy of this message
ID: 48011 Updated by: jani@php.net Reported By: joris at bonboa dot com -Status: Open +Status: Feedback -Bug Type: Unknown/Other Function +Bug Type: Strings related Operating System: Mac OS X PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#135948) next »