background image

#1 iterate() called at [C:\htdocs\php_stuff\index.php:25]
#0 recur() called at [C:\htdocs\php_stuff\index.php:8]
#1 iterate() called at [C:\htdocs\php_stuff\index.php:21]
#2 recur() called at [C:\htdocs\php_stuff\index.php:8]
#3 iterate() called at [C:\htdocs\php_stuff\index.php:25]
#0 recur() called at [C:\htdocs\php_stuff\index.php:8]
#1 iterate() called at [C:\htdocs\php_stuff\index.php:21]
#2 recur() called at [C:\htdocs\php_stuff\index.php:8]
#3 iterate() called at [C:\htdocs\php_stuff\index.php:21]
#4 recur() called at [C:\htdocs\php_stuff\index.php:8]
#5 iterate() called at [C:\htdocs\php_stuff\index.php:25]
7. metaphone()
这个函数返回单词的

metaphone 值,相同读音的单词具有相同的 metaphone 值,也就是说

这个函数可以帮你判断两个单词的读音是否

 相同。不过对中文就无效了。。。

8. natsort()
natsort()能将一个数组以自然排序法 进行排列,直接看个例子吧:

$items

 = 

array

(

“100 apples”, “5 apples”, “110 apples”, “55 apples”
);

// normal sorting:

sort(

$items

);

print_r(

$items

);

# Outputs:
# Array
# (
# [0] => 100 apples
# [1] => 110 apples
# [2] => 5 apples
# [3] => 55 apples
# )
natsort(

$items

);

print_r(

$items

);

# Outputs:
# Array
# (
# [2] => 5 apples
# [3] => 55 apples
# [0] => 100 apples
# [1] => 110 apples
# )
9. levenshtein()
Levenshtein() 告诉你两个单词之间的“距离”。它告诉你如果想把一个单词变成另一个单词,
需要插入、替换和删除多少字母。
看个例子吧: