PHP metaphone() Function

The metaphone() function in PHP calculates the metaphone key (representing how a string sounds or pronounced) of a string. This function is used to text search and text matching or spelling applications.

Syntax

Parameter

str(required)- This parameter specifies the input string.

phonemes(optional)- This parameter specifies the maximum length of the metaphone key and restricts the returned metaphone key. The default value is 0 (means no restriction).

Return

This function returns the metaphone key as a string or FALSE on failure.

Example 1

Output

Example 2

Output

Example 3

Output

Example 4

Output

Pin It on Pinterest

Share This