#48011 [Opn]: levenshtein second variant fails

From: Date: Sat, 18 Apr 2009 10:32:36 +0000
Subject: #48011 [Opn]: levenshtein second variant fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135947@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: Open Bug Type: Unknown/Other Function Operating System: Mac OS X -PHP Version: 5.2.9 +PHP Version: 5.2.5 New Comment: My PHP version = 5.2.5 Previous Comments: ------------------------------------------------------------------------ [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 (#135947) next »