PHP metaphone() Function

The metaphone() function is used to the return if the strings sound is similar.

Demo :



Type Text 1 Type Text 2  

Example :

Example 1:  rest    reset

Example 2:  deep    dip

Example 3:  fire    higher

Following code is metaphone() function demo code If you need to you copy and use to your website.


<?php
  echo (metaphone('fire') == metaphone('higher')) ? "Strings are similar" : "Strings are not similar";
?>

In the metaphone() function have two parameters that name is string text,int phones.In the above code is used to if the string sound is similar "Strings are similar" output message will display otherwise "Strings are not similar" message will display.

Free Download Script :

If you need metaphone() function demo code download from following link.

Download




Content