How to get list of functions that are declared in a php file
10条回答 默认 最新
dpql57753 2010-02-04 06:48关注You can use the
get_defined_functions()function to get all defined function in your current script.See: http://www.php.net/manual/en/function.get-defined-functions.php
If you want to get the functions defined in another file, you can try using http://www.php.net/token_get_all like this:
$arr = token_get_all(file_get_contents('anotherfile.php'));Then you can loop through to find function tokens with the symbols defined. The list of tokens can be found http://www.php.net/manual/en/tokens.php
解决 无用评论 打赏 举报