From ef05457faa8045529ef7d0ec97309667838feb44 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Wed, 4 Nov 2020 10:08:57 +0000 Subject: [PATCH] Fix #60314: Metaphone returns fewer phonemes than defined git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351215 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/metaphone.xml | 32 ++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/reference/strings/functions/metaphone.xml b/reference/strings/functions/metaphone.xml index 7da251bfc3..f1485aa80f 100644 --- a/reference/strings/functions/metaphone.xml +++ b/reference/strings/functions/metaphone.xml @@ -47,7 +47,9 @@ This parameter restricts the returned metaphone key to - phonemes characters in length. + phonemes characters in length. + However, the resulting phonemes are always transcribed completely, so the + resulting string length may be slightly longer than phonemes. The default value of 0 means no restriction. @@ -76,7 +78,7 @@ var_dump(metaphone('programmer')); ?> ]]> - &example.outputs.similar; + &example.outputs; ]]> - &example.outputs.similar; + &example.outputs; + + + Using the <parameter>phonemes</parameter> parameter + + In this example, metaphone is advised to produce a string + of five characters, but that would require to split the final phoneme + ('x' is supposed to be transcribed to 'KS'), + so the function returns a string with six characters. + + + +]]> + + &example.outputs; + + + + +