Created
May 6, 2024 11:45
-
-
Save emmadesilva/aa666a98f5d27a194b010e32a5036e72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // PHP has a number of built-in functions that allow you to perform | |
| // linguistic operations on strings with knowledge of phonetics, | |
| // as well as the English language rules and pronunciations. | |
| // Calculate the metaphone key of a string | |
| echo metaphone('test'); // TST | |
| // Calculate the soundex key of a string | |
| echo soundex('test'); // T230 | |
| // Calculate Levenshtein distance between two strings | |
| echo levenshtein('test', 'tset'); // 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment