2011-09-28 33 views

回答

1

您還可以使用phpsh。使用phpsh,你可以從命令行執行php代碼,也可以看到使用功能文檔

d function_name 

在phpsh提示符下。

4

您可以安裝pman,它提供的手冊頁(與pman作爲包裝)爲PHP。

0

我看着這些其他建議,他們似乎是矯枉過正。下面是使用shell腳本我的解釋:

php_search.sh

#!/bin/bash 

FUNC=$(echo $1 | tr '_' '-') 

curl -sL http://php.net/manual/en/function.$FUNC.php | \ 
    grep -A6 methodsynopsis | \ 
    sed 's/<[^>]*>//g' | \ 
    sed 's/&nbsp;//g' | \ 
    xargs 

用法:

$ php_search.sh strpos 
int strpos (string $haystack , mixed $needle [, int $offset = 0 ]) 

$ php_search.sh mysql_query 
resource mysql_query (string $query [, resource $link_identifier = NULL ])