• PHP Video Tutorials

PHP - Function Metaphone



Syntax

string metaphone ( string $str [, int $phonemes = 0 ] )

Definition and Usage

It is used to calculates the metaphone key of a string

Return Values

It returns the metaphone key as a string, or false on failure.

Parameters

Sr.No Parameters & Description
1

str

It contains the information about input string.

2

length

It specifies the length of metaphone key.

Example

Try out the following example

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

This will produce following result −

TTRLSPNT
php_function_reference.htm
Advertisements