soundex() function in PHP


The soundex() function in PHP is used to calculate the soundex key of string. The key is a four character long alphanumeric string representing English pronunciation of a word.

Syntax

soundex()

Parameters

  • NA

Return

The soundex() function returns the soundex key as a string.

Example

The following is an example −

Live Demo

<?php
   $res = "Welcome"; 
   echo soundex($res);
?>

Output

W425

Updated on: 30-Jul-2019

88 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements