English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Manual of String Functions
The soundex() function is used to calculate the soundex key of a string.
string soundex ( string $str )
Used to calculate the soundex key of a string.
The soundex key is 4 A alphanumeric string of characters, representing the English pronunciation of a word.
The soundex() function can be used in spelling check programs.
Note:The soundex() function creates the same key for words with similar pronunciation.
Tip: metaphone() More accurate than the soundex() function because metaphone() understands the basic pronunciation rules of English.
It returns the soundex key in string form
Serial Number | Parameter and Description |
---|---|
1 | string Enter String |
Try the following example, calculate the string oldtoolbag.com's Soundex key:
<?php //Calculate the string oldtoolbag.com's Soundex key. $input = "oldtoolbag.com"; echo soundex($input); ?>Test and see‹/›
Output Result
N250