位置: 编程技术 - 正文

PHP字符串函数metaphone()的用法(php字符串函数大全)

编辑:rootadmin
metaphone

推荐整理分享PHP字符串函数metaphone()的用法(php字符串函数大全),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:在php中,字符串有哪些表示形式,php字符串定义的三种方式,php中字符串函数,在php中,字符串有哪些表示形式,php字符串赋值,php字符串定义的三种方式,php字符串定义,php字符串型数据的定义方式,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

metaphone — Calculate the metaphone key of a string

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

Calculates the metaphone key of str.

Similar to soundex() metaphone creates the same key for similar sounding words. It&#;s more accurate than soundex() as it knows the basic rules of English pronunciation. The metaphone generated keys are of variable length.

Metaphone was developed by Lawrence Philips <lphilips at verity dot com>. It is described in ["Practical Algorithms for Programmers", Binstock & Rex, Addison Wesley, ].

参数

str

The input string.

phonemes PHP字符串函数metaphone()的用法(php字符串函数大全)

This parameter restricts the returned metaphone key to phonemes characters in length. The default value of 0 means no restriction.

返回值

Returns the metaphone key as a string, 或者在失败时返回 FALSE.

范例

Example #1 metaphone() basic example

<?phpvar_dump(metaphone('programming'));var_dump(metaphone('programmer'));?>

以上例程的输出类似于:

Example #2 Using the phonemes parameter

<?phpvar_dump(metaphone('programming',5));var_dump(metaphone('programmer',5));?>

以上例程的输出类似于:

PHP字符串函数levenshtein()的用法 levenshtein(PHP4=4.0.1,PHP5)levenshtein计算两个字符串之间的编辑距离说明intlevenshtein(string$str1,string$str2)intlevenshtein(string$str1,string$str2,int$cost_ins,int$cost_rep,int$cost_

PHP字符串函数md5()的用法 md5(PHP4,PHP5)md5计算字符串的MD5散列值说明stringmd5(string$str[,bool$raw_output=false])使用RSA数据安全公司的MD5报文算法计算str的MD5散列值。参数str原始字符串。raw

PHP字符串函数md5_file()的用法 md5_file(PHP4=4.2.0,PHP5)md5_file计算指定文件的MD5散列值说明stringmd5_file(string$filename[,bool$raw_output=false])使用RSA数据安全公司的MD5报文算法计算filename文件的MD5

本文链接地址:https://www.jiuchutong.com/biancheng/278855.html 转载请保留说明!

上一篇:PHP字符串函数nl_langinfo()的用法(php字符串定义)

下一篇:PHP字符串函数levenshtein()的用法(php字符串操作函数)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络