开发者

Find user defined functions and their usage in a massive code base

I'm currently working with an massive PHP codebase, witch is completel开发者_StackOverflowy undocumented.

Here's the deal. All of the PHP code is included every page call. They build a simple include all kinda function that scan's the directory and includes all PHP files it can find. It works recursively for all the subfolders.

I would like to know what functions are used in what files and from which files those functions came.

I need to know this in order to switch to normale includes. Also it gives me more information about not used functions and files (since it a really old and big codebase, there is a lot of legacy in it).

It there a tool or something for PHP that can check this kind of stuff in a codebase?


NetBeans gives me pretty good visibility, for the spot inquiry. I'm interested to see if you get something with more value as a straight "audit" or inventory tool.


It's an old question so you seem to have found a solution. There's a php function: get_defined_functions(), get_defined_vars(), get_defined_constants(). You can use them in a page and you know the functions/vars/constants defined for use but not being used.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜