PHP metaphone() function4 Sept 2024 | 1 min read PHP metaphone() function is predefined function. It is used to calculate the metaphone key of a string. It is useful to text search and text matching application. It is phonetic algorithm developed by Lawrence Philips. The algorithm produces variable length keys as output. Syntax:
Example 1Output: Before using metaphone() function:Hello PHP After using metaphone() function: HLFP Example 2Output: NS NS Example 3Output: string(7) "PRKRMNK" string(6) "PRKRMR" Example 4Output: NS NS Note: Given above example by using the length of parameter.Next TopicPHP String |
PHP Function The function is used to remove whitespace or other predefined character from the right end of a string. Syntax: chop(string,charlist); Note: function is different than the Perl function function, which is used to remove the last character in the string. Parameter Description Required/Optional string the string to be check Required charlist charlist...
1 min read
PHP Function The strops() is in-built function of PHP. It is used to find the position of the first occurrence of a string inside another string or substring in a string. Syntax: int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ); Parameter Description Required/Optional string Specify the...
2 min read
PHP String function The is one of the most popular functions of PHP, which is widely used to convert the string into lowercase. It takes a string as a parameter and converts all uppercase English character of that string to lowercase. Other characters such as...
2 min read
PHP Function The function in inbuilt function of PHP. It is used to find the position of the last occurrence of a string. This function returns all characters from this position to the end of the string or FALSE if the character is not found. Note: The...
1 min read
PHP String Function The is an in-built function of PHP, which is used to convert the first character of each word to uppercase in a string. The is supported by the PHP 4 and above versions. It takes a string as an input and...
2 min read
PHP string function The is in-built function of PHP. It is used to randomly shuffle all the character of a string. One Permutation of all possible is created. Note: This function "" does not generate cryptographically secure value. If we want to cryptographically secure then use...
1 min read
PHP soundex() function PHP soundex() function is used to calculate the soundex key of a string. Its key has property and can be used to search in database where pronunciation is known but not the spelling. Soundex function is described by Donald Knuth. Syntax: soundex(string); Parameter Description Required/Optional String Specify the string to check Required. Example 1 <?php $str...
1 min read
PHP String function The is an in-built function of PHP, which is used to replace a substring inside the other string. It provides the facility to change the particular word in a string. The function translates characters or replaces the substrings. It is a...
3 min read
function in PHP The is a case-insensitive, built-in function of PHP. It compares two strings for the first n characters. This function is similar to the strcasecmp() function with a difference. In , we can specify the number of characters from both the strings for...
3 min read
PHP string Function The is predefined PHP string function. It is used to returns a hashed string by using DES, Blowfish, or MD5 algorithms. Following are some constants of function [CRYPT_STD_DES] [CRYPT_EXT_DES] [CRYPT_MD5] [CRYPT_BLOWFISH] [CRYPT_SHA_256] [CRYPT_SHA_512] etc. Syntax: string crypt ( string $str [, string $salt ] ); Parameter Description Required/Optional str Specify the string to be hashed required salt Specify...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India