Hi
I have a project with a lot of PHP code, and I want to run a tool that will detect if it has any dead code (not called) and lists them so that I can remove.
Is there such a PHP tool?
Thanks
Jeff in Seattle
PHP Tool: Dead Code Detection?
Moderator: General Moderators
-
jeff00seattle
- Forum Commoner
- Posts: 66
- Joined: Sat Feb 28, 2009 3:27 pm
- Sofw_Arch_Dev
- Forum Commoner
- Posts: 60
- Joined: Tue Mar 16, 2010 4:06 pm
- Location: San Francisco, California, US
Re: PHP Tool: Dead Code Detection?
A "profiler" would probably do the trick. I haven't used one for PHP, but they generally analyze your code and give statistics on your code files such as the amount of usage it gets, amount of memory it consumes, amount of time spent etcetera. This may do what you want.
Do a web search for PHP profiler. There are several available.
Do a web search for PHP profiler. There are several available.
Re: PHP Tool: Dead Code Detection?
More specifically you need code coverage analysis tool. Xdebug can gather code coverage data, for example.