background image

10.

$a++;     

11.

// how did I get here?     

12.

echo “\n\n\n”;     

13.

debug_print_backtrace();     

14.

if( $a < 10 )     

15.

iterate();     

16.

}     

17.

iterate();     

18.

# OUTPUT:     

19.

#0 recur() called at [C:\htdocs\php_stuff\index.php:8]     

20.

#1 iterate() called at [C:\htdocs\php_stuff\index.php:25]     

21.

#0 recur() called at [C:\htdocs\php_stuff\index.php:8]     

22.

#1 iterate() called at [C:\htdocs\php_stuff\index.php:21]     

23.

#2 recur() called at [C:\htdocs\php_stuff\index.php:8]     

24.

#3 iterate() called at [C:\htdocs\php_stuff\index.php:25]     

25.

#0 recur() called at [C:\htdocs\php_stuff\index.php:8]     

26.

#1 iterate() called at [C:\htdocs\php_stuff\index.php:21]     

27.

#2 recur() called at [C:\htdocs\php_stuff\index.php:8]     

28.

#3 iterate() called at [C:\htdocs\php_stuff\index.php:21]     

29.

#4 recur() called at [C:\htdocs\php_stuff\index.php:8]     

30.

#5 iterate() called at [C:\htdocs\php_stuff\index.php:25]   

  

7. metaphone()

  这个函数返回单词的

metaphone 值,相同读音的单词具有相同的 metaphone 值,

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

 相同。

  

8. natsort()

  

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

 

1.

$items = array(     

2.

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

3.

);     

4.

// normal sorting:     

5.

sort($items);     

6.

print_r($items);     

7.

# Outputs:     

8.

# Array     

9.

# (     

10.

# [0] => 100 apples     

11.

# [1] => 110 apples     

12.

# [2] => 5 apples     

13.

# [3] => 55 apples