|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-16 00:54 UTC] felipe@php.net
[2011-11-16 00:54 UTC] felipe@php.net
-Status: Open
+Status: Bogus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 09 03:00:01 2025 UTC |
Description: ------------ The metaphone function accepts two parameters: an input string, and a string length limit. With certain input, it is possible to cause metaphone to return a string longer than the specified limit. The issue seems to arise when the string is nearing it's length limit and the following input character is an X, which can translate to a KS, pushing the string over its limit. Test script: --------------- <?php var_dump( metaphone('administratrix', 10) ); var_dump( metaphone('asterix', 5) ); ?> Expected result: ---------------- string(10) "ATMNSTRTRK" string(5) "ASTRK" Actual result: -------------- string(11) "ATMNSTRTRKS" string(6) "ASTRKS"