# PHPStan

> PHP static analysis that finds bugs without running your code

Source: https://talira.ai/catalog/phpstan-5dffx9mn
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / type checking](https://talira.ai/categories/developer-tools/type-checking), [developer tools / code quality](https://talira.ai/categories/developer-tools/code-quality), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^2]
- Pricing: Free tier[^1]
- Pricing notes: PHPStan is free and open source (MIT). PHPStan Pro is a paid subscription for individuals and teams with a web UI and continuous analysis; its current prices are behind sign-up.
- Free tier: yes[^1]
- Plugins: yes[^1]
- Backed by: [Ondřej Mirtes](https://talira.ai/orgs/ondrej-mirtes.md)

PHPStan is a static analysis tool for [PHP](https://talira.ai/catalog/php-xgsnpvzp.md): it scans a whole codebase and reports bugs such as calls to undefined methods, wrong argument types and dead branches, even in code no test covers, without running it. Rule levels let a team start loose and tighten over time, and a baseline file records existing errors so new code can be held to a higher standard at once. PHPDoc types add generics, array shapes and other types PHP itself lacks. Extensions cover Symfony, Laravel, Doctrine, PHPUnit and other frameworks' magic, and teams run it on their machines and in CI. It installs with Composer as phpstan/phpstan. PHPStan Pro, a paid subscription, adds a web UI for browsing errors and continuous analysis in the background.

## Links

- Website: https://phpstan.org/
- GitHub: https://github.com/phpstan/phpstan
- Docs: https://phpstan.org/user-guide/getting-started

## Problems it solves

- find bugs in a legacy PHP codebase that has almost no tests
- fail CI when a PHP change calls a method that doesn't exist
- add stricter type checking to a Laravel app gradually without fixing thousands of errors first
- catch type errors in PHP before deploying

## Features

- 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

## Capabilities

- Has a command line tool: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.76 out of 1.
Signals: maintenance 1.00, adoption 0.83, momentum 0.62, community 1.00, backing 0.30, extensibility 0.40.

- last commit today
- 794 commits in the last 90 days
- latest release 2.3.7 4 days ago
- 14.2k GitHub stars
- 311 contributors
- accepts sponsorship (Github, Github)
- backed by Ondřej Mirtes
- has a plugin system

## Alternatives

- [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md): Detect and fix coding standard violations in PHP

## Sources

[^1]: https://phpstan.org/ (checked 24 Nov 2026)
[^2]: https://github.com/phpstan/phpstan (checked 24 Nov 2026)
