Determining which PHP source files are not used

2019-06-21 22:17发布

I have a large web app, and I think there are a bunch of old files that are no longer being used, is there an app which can tell me what these files are?

3条回答
Root(大扎)
2楼-- · 2019-06-21 22:46

There is also the Dead Code Detector (DCD). It finds functions that are never called, which may help to clean up even the files you keep in production.

查看更多
干净又极端
3楼-- · 2019-06-21 22:56

You should be able to start with your web server logs. These will show you which files ARE being used. From there you should be able to track down a good number of the files those reference. Don't know of a good way to find out which aren't being used, only those that are.

查看更多
劳资没心,怎么记你
4楼-- · 2019-06-21 23:02

I think you need to check out the project management tools available for php.

You can have a look at phpUnderControl (http://www.phpundercontrol.org/about.html) and CruiseControl (you can google it).

You can also use a tool (i.e and IDE) that will give a Code Coverage Report.

查看更多
登录 后发表回答