dqrl3595 2010-02-04 06:44
浏览 71

php文件的功能列表

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

    评论

报告相同问题?