From: chen dot daqi at gmail dot com Operating system: Linux PHP version: 5.1.2 PHP Bug Type: Strings related Bug description: levenshtein with 3 parameters does not work as expected
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 bug report at http://bugs.php.net/?id=36470&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36470&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36470&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36470&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36470&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36470&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36470&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36470&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36470&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36470&r=support Expected behavior: http://bugs.php.net/fix.php?id=36470&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36470&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36470&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36470&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36470&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36470&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36470&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36470&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36470&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36470&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36470&r=mysqlcfg