Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

PHPStan review

Freemium#5 of 25 in Static Type Checkers

A good fit for PHP teams that want to tighten type checks gradually and run them in CI.

8.8/10Editor score
PHPStan8.8 Visit PHPStan

Reviewed by iTechGuides Editors · Editorial team · Updated Dec 2026

PHPStan finds problems in PHP code without executing it. It checks native types and PHPDoc annotations, infers types, and flags issues such as unknown symbols, invalid arguments, and dead code. It suits PHP developers who want feedback on those problems before runtime, whether they work alone or need to enforce the same checks across a team. The open-source analyzer runs from the command line through Composer or a PHAR and can target specific project directories.

The most useful distinction for an established codebase is between rule levels and baselines. Rule levels 0 through 10 let you adjust how strict the analysis is, while a baseline suppresses existing findings so you can focus on new ones. That gives a team a way to introduce checks in CI without fixing every existing finding first. A baseline doesn't resolve those findings; it keeps them out of the reported results. Result caching speeds up subsequent analyses as the team runs checks again.

For teams already using GitHub Actions, GitLab CI, or TeamCity, PHPStan offers compatible output formats. Extensions cover Symfony, Laravel, Doctrine, and PHPUnit, and editor integration is available through editor URLs and editor mode. The deployment is self-hosted and requires PHP 7.4 or later to run the analyzer, so look elsewhere if you need a hosted checker. The free plan is a good fit if command-line and CI workflows are enough; consider the paid PHPStan Pro add-on if you want a browser interface for errors and continuous background analysis.

PHPStan pros and cons

  • Where it wins
    • Checks native PHP types and PHPDoc and can infer types
    • Rule levels 0 through 10 and baselines support gradual adoption
    • CI output formats for GitHub Actions, GitLab, and TeamCity
  • Where it doesn't
    • Requires PHP 7.4 or later to run
    • Self-hosted deployment leaves setup to your team
    • Browser UI and continuous analysis require the paid PHPStan Pro add-on

PHPStan fact sheet, pricing and score →

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update