[EMAIL PROTECTED] wrote:
>
> From: [EMAIL PROTECTED]
> Operating system: Win2k
> PHP version: 4.0.5
> PHP Bug Type: *Function Specific
> Bug description: levenshtein doesn't handle odd arguments well
>
> Hello Hartmut,
>
> levenshtein ('foot','fot','0','0','1');
> - and -
> levenshtein ('foot','fot','0','1','1');
>
> return the following error:
>
> Warning: levenshtein(): argument string(s) too long in
>f:/xitami/pub/php_er/mysql/test.php on line 3
<?
echo levenshtein ('foot','fot','0','0','1')."<br>\n";
echo levenshtein ('foot','fot','0','1','1')."<br>\n";
echo levenshtein ('foot','fot','1','1','0')."<br>\n";
echo levenshtein ('foot','fot','1','0','0')."<br>\n";
echo levenshtein ('foot','fot','0','0','0')."<br>\n";
?>
gives
1
1
0
0
0
for me (php-4.0.5 on a linux box)
i know that it isn't checking for negative weights which would produce
the message mentioned above, but zeros shouldn't break anything ... ?
--
Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de +49-711-99091-77
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]