Calculate the metaphone key of a string
Syntax
metaphone ( string $str [, int $phonemes = 0 ] ) : string
Parameters
str
The input string.
phonemes
This parameter restricts the returned metaphone key to phonemes characters in length. The default value of 0 means no restriction.
Return
Returns the metaphone key as a string, or FALSE on failure.
Examples
1 · str
<? $str = 'programming'; $return = metaphone($str); echo $return; ?>
PRKRMNK
2 · phonemes
<? $str = 'programming'; $phonemes = 5; $return = metaphone($str, $phonemes); echo $return; ?>
PRKRM