#36470 [Opn]: levenshtein with 3 parameters does not work as expected

From: Date: Wed, 22 Feb 2006 07:33:14 +0000
Subject: #36470 [Opn]: levenshtein with 3 parameters does not work as expected
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969372045@lists.php.net to get a copy of this message
ID: 36470 Updated by: tony2001@php.net Reported By: chen dot daqi at gmail dot com Status: Open -Bug Type: Strings related +Bug Type: Documentation problem Operating System: Linux PHP Version: 5.1.2 New Comment: Reclassified as docu problem. Previous Comments: ------------------------------------------------------------------------ [2006-02-21 09:18:38] chen dot daqi at gmail dot com Description: ------------ Hi, levenshtein("abc", "abbc", 2) is valid according to PHP manual, but in fact it issues a warning and return -1. Reproduce code: --------------- <?php var_dump(levenshtein("abc", "abbc", 2)); ?> Expected result: ---------------- int(2) Actual result: -------------- Warning: levenshtein(): The general Levenshtein support is not there yet in lev.php on line 2 Warning: levenshtein(): Argument string(s) too long in lev.php on line 2 int(-1) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36470&edit=1

« previous php.doc (#969372045) next »