Example 1 — Get the Metaphone Key
Pass a word and get its sound code.
<?php
echo metaphone("Thompson"), PHP_EOL;
echo metaphone("Thumb"), PHP_EOL; How It Works
- Pass a name. Thompson is a good test word.
- Silent letters drop out. The P is not kept in the key.
- Th can become 0. Thumb starts with the zero sign.
- Read the output. Each call returns a short uppercase key.

