NYCPHP Meetup

NYPHP.org

[nycphp-talk] Any PHP Analysis Tools?

Andrew Yochum andrew at plexpod.com
Fri Apr 28 12:01:28 EDT 2006


On Fri, Apr 28, 2006 at 10:27:00AM -0400, Keith Casey wrote:
> I just got a steaming pile of PHP dropped in my lap which - as far as
> I can tell - has no classes, 100+ functions, lots of globals, nothing
> resembling security and/or input filtering, a rather large user base,
> and a hitlist of new requirements/requests.  Help!
> 
> Alright, got that out of the way...
> 
> Now I'm trying to do some analysis to figure out which functions and
> variables are/aren't being used, the general flow of the code, and
> some basic metrics.  Something like PMD or Perl::Critic (I think)
> would be the ideal, but now I'd just be happy with something beyond my
> mediocre grepping skills.
> 
> I've dug around and found this -
> http://dev.eclipse.org/newslists/news.eclipse.tools.php/msg00038.html
> - which doesn't bode well, but I thought maybe someone around here
> would know some more...  ideas?

Xdebug is great for tracing & profiling code.  Use it with kcachegrind
for nice visualization.  It won't give you the code analysis stuff that
Perl::Critic would, but its a start to give you a picture of whats going
on.

HTH,
Andrew
-- 
Andrew Yochum
Plexpod
andrew at plexpod.com
718-360-0879



More information about the talk mailing list