Bug #80073 [Com]: levenshtein(): new ValueError not documented

From: Date: Fri, 09 Oct 2020 15:43:07 +0000
Subject: Bug #80073 [Com]: levenshtein(): new ValueError not documented
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229499@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80073&edit=1 ID: 80073 Comment by: claude dot pache at gmail dot com Reported by: claude dot pache at gmail dot com Summary: levenshtein(): new ValueError not documented Status: Closed Type: Bug Package: *General Issues PHP Version: 8.0.0 Assigned To: nikic Block user comment: N Private report: N New Comment: There is still a documentation issue, which was the original purpose of this bug report. Previous Comments: ------------------------------------------------------------------------ [2020-10-09 14:15:07] nikic@php.net The string length limitation and the accompanying ValueError are now gone... ------------------------------------------------------------------------ [2020-10-06 15:18:57] nikic@php.net PR to drop the check: https://github.com/php/php-src/pull/6286 ------------------------------------------------------------------------ [2020-10-06 15:10:59] nikic@php.net I wonder if we can't just drop that error condition altogether. Why is there a limitation of 255 characters? My best guess is that it's supposed to protected against the quadratic time complexity of the algorithm. But then again, the similar_text() function which has much worse (cubic) complexity, does not come with such a limitation. This doesn't seem like something PHP should be enforcing. ------------------------------------------------------------------------ [2020-09-07 10:01:39] requinix@php.net Changed during https://github.com/php/php-src/pull/5816 ------------------------------------------------------------------------ [2020-09-07 09:52:13] claude dot pache at gmail dot com Moreover, the change of behaviour of levenshthein() between PHP 7 and PHP 8 (which is a BC break) is currently not documented in UPGRADING: https://github.com/php/php-src/blob/php-8.0.0beta3/UPGRADING ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=80073 -- Edit this bug report at https://bugs.php.net/bug.php?id=80073&edit=1

« previous php.bugs (#229499) next »