PHPMD

PHPMD

PHP Mess Detector (PHPMD) is a tool for finding potential problems in your PHP code base. The tool outputs a detailed HTML report, which highlights the file name, line number, and a description of the potential problem detected.

Some examples of the kinds of problems the tool can find are:

  • Overly complex or long classes and methods.
  • Unused parameters in methods.
  • Unused variables or private methods.

You can find a full list of all of the rules applied by PHPMD during analysis on the PHPMD home site here:

Current Rulesets

Like all code analysis tools, PHPMD is no silver bullet but it will provide you with lots of hints on where you should be looking in your code for potential problems, particularly if you care about writing maintainable code.

John Collins

I have been writing about web technology and software development since 2001. I am the developer of the Alpha Framework for PHP, and the five.today personal productivity app. I love open source, technology, and economics.

Alpha Framework 2.0 Beta

Book Reviews