Easy Tutorial
❮ Php Unset Function Func String Substr Count ❯

PHP soundex() Function

PHP String Reference Manual

Example

Calculate the soundex key for "Hello":


Definition and Usage

The soundex() function calculates the soundex key of a string.

The soundex key is a 4-character alphanumeric string that represents the English pronunciation of a word.

The soundex() function can be used in spelling checkers.

Note: The soundex() function creates the same key for words that sound alike.

Tip: metaphone() is more accurate than soundex() because metaphone() understands the basic rules of English pronunciation.


Syntax

Parameter Description
string Required. Specifies the string to be checked.

Technical Details

Return Value: Returns the soundex key of the string if successful, or FALSE if it fails.
PHP Version: 4+
--- ---

More Examples

Example 1

Using the soundex() function on two words with similar pronunciation:


❮ Php Unset Function Func String Substr Count ❯