Function list of php file

前端 未结 12 1318
南方客
南方客 2020-11-28 14:40

How to get list of functions that are declared in a php file

12条回答
  •  情书的邮戳
    2020-11-28 15:15

    I wrote this small function to return the functions in a file.

    https://gist.github.com/tonylegrone/8742453

    It returns a simple array of all the function names. If you're calling it in the particular file you want to scan, you can just use the following:

    $functions = get_functions_in_file(__FILE__);

提交回复
热议问题