metaphone()

It calculate the metaphone key of a string

  • A metaphone key represents how a string sounds if said by an English speaking person.
  • The metaphone() function can be used for spelling applications.
  • The metaphone() function creates the same key for similar sounding words.
  • The generated metaphone keys vary in length.

Example

<?php
 echo metaphone("phpcode");
 ?>

Output

FPKT

Share