PHPStan
PHPStan: A good fit for PHP teams that want to tighten type checks gradually and run them in CI. Ranked #5 of 25 in Static Type Checkers by our editors (8.8/10); pricing: Free plan · 30-day trial; best for PHP teams needing configurable, CI-ready analysis.
At a glance
- Editor score8.8 / 10
- PricingFree plan · 30-day trial
- Best forPHP teams needing configurable, CI-ready analysis
- Free planYes
- Founded2016
- Facts checked23 Sep 2026
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
Our verdict on PHPStan
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.
Your product? Our editors can test PHPStan in depth and publish a review, labelled as paid · from $149/mo →
PHPStan pricing
PHPStan fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Not verified |
| Supported languages | Not verified |
| Analysis scope | Not verified |
| IDE plugins | Not verified |
| CI/CD integration | Yes |
| Incremental analysis | Not verified |
| Strictness controls | Not verified |
| License model | Not verified |
| Free trial | 30 days |
| Deployment | Self-hosted |
| Support | Docs, Community |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 8 integrations: Composer, Docker, GitHub Actions, GitLab CI, Symfony, Laravel … See all → |
| Pricing | Free plan · 30-day trial |
| Website | phpstan.org |
| Facts checked | 23 Sep 2026 |
PHPStan integrations
PHPStan lists 8 integrations on its own site.
- Composer
- Docker
- GitHub Actions
- GitLab CI
- Symfony
- Laravel
- Doctrine
- PHPUnit
See all PHPStan integrations →
Alternatives to PHPStan
- TypeScriptA mature, free checker for TypeScript and JavaScript teams that need configurable strictness.9.4
- DialyzerChoose Dialyzer for inferred types and incremental checks in Erlang/OTP projects.9.2
- Hack typecheckerA free, open-source Hack checker with incremental analysis, IDE diagnostics and CI support.9.0
See all PHPStan alternatives →
PHPStan vs the competition
- PHPStan vs TypeScript
- PHPStan vs Dialyzer
- PHPStan vs Hack typechecker
- PHPStan vs mypy
- PHPStan vs Flow
- PHPStan vs pytype
Compare PHPStan with any tool side by side →
Used PHPStan? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used PHPStan for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
PHPStan is listed in our Static Type Checkers directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/phpstan/"><img src="https://www.itechguides.com/best/badge/phpstan.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Dec 2026
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