talira

Compare

PHPMDPHPStanPHPCompatibilityPHP_CodeSniffer
What it isPHP Mess Detector: finds bugs and code smells in PHPPHP static analysis that finds bugs without running your codePHP_CodeSniffer sniffs that check PHP code for cross-version compatibilityDetect and fix coding standard violations in PHP
KindOpen sourceOpen sourceOpen sourceOpen source
Trust0.650.760.640.74
Stars24611417123161574
Last commit2026-11-102026-11-242026-11-202026-11-23
LicenceBSD-3-ClauseMITLGPL-3.0-or-laterBSD-3-Clause
PricingFree and open sourceFree tierFree and open sourceFree and open source
Free tierYesYesYesYes
Self-hostable————
Ways to run it————
SOC 2————
HIPAA————
SSO————
API————
Plugins—Yes—Yes
MCP server————
CompanyPHPMD projectOndřej MirtesPHPCompatibilityPHPCSStandards
Features
  • rules for possible bugs, unused code and overcomplicated expressions
  • configurable rule sets
  • command line and CI use
  • built on PHP Depend metrics
  • whole-codebase static analysis
  • rule levels 0 to 10
  • baseline for existing errors
  • generics and array shapes in PHPDoc
  • framework extensions for Symfony, Laravel and Doctrine
  • result cache and parallel analysis
  • PHPStan Pro web UI
  • sniffs that flag PHP features unavailable or changed in a chosen PHP version or range
  • testVersion set per run or in a custom ruleset
  • consistent results whichever PHP version runs PHP_CodeSniffer
  • framework, CMS and polyfill specific rulesets that extend it
  • phpcs detects coding standard violations
  • phpcbf fixes them automatically
  • built-in standards and custom rulesets
  • project configuration files
  • signed PHAR downloads and Composer
Limitations
      • Coverage of PHP compatibility changes isn't complete, and changes before PHP 5.1 are only patchily covered.
      • Needs PHP 7.2+, PHP_CodeSniffer 4.0.2+ and PHPCSUtils 1.1.2+.