Basic tools for analyze PHP Code

If you get enrollment into a new work to maintain  Php project with millions of thousands of  lines of code written these tools can be one of your best friends.

phploc: phploc is a tool for quickly measuring the size of a PHP project.

install on fedora 15:

su

yum install php-phpunit-phploc.noarch

usage:

phploc <php source code dir>

phpdcd: phpdcd is a Dead Code Detector (DCD) for PHP code. It scans a PHP project for code that is no longer used.

install on fedora 15:

su

yum install php-phpunit-phpdcd.noarch

usage:

phpdcd  <php source code dir>

phpcpd: phpcpd is a Copy/Paste Detector (CPD) for PHP code. It scans a PHP project for duplicated code.

install on fedora 15:

su

yum install php-phpunit-phpcpd.noarch

usage:

phpcpd <php source code dir>

if your project is enormous you will need another key tools: Hope, Faith and Hard Work

more info about these tools and more at http://sebastian-bergmann.de/software/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.