PHP Static Analysis Tool - discover bugs in your code without running it!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ondrej Mirtes 48236ddf82
PHPStan 0.12.100
4 weeks ago
.github Update Rector integration test 1 year ago
conf Backwards-compatible bleedingEdge.neon file 3 years ago
docker Faster Docker build 2 years ago
e2e Revert "Update PMMP baseline" 1 year ago
issue-bot Bump league/commonmark from 1.6.2 to 1.6.5 in /issue-bot 1 year ago
playground-api Bump path-parse from 1.0.6 to 1.0.7 in /playground-api 1 year ago
playground-runner Bump bref/bref from 1.2.7 to 1.2.13 in /playground-runner 1 year ago
website Update 1 year ago
.gitattributes Update .gitattributes 1 year ago
.gitignore E2E tests for the PHAR 3 years ago Update 2 years ago Code of Conduct 6 years ago
LICENSE License copyright - use only starting year, the current year is not needed apparently 5 years ago New sponsor - Craft CMS 1 year ago
bootstrap.php Update custom PHAR prefix 1 year ago
composer.json Allow PHP 8 2 years ago
phpstan /w alias 2 years ago
phpstan.phar PHPStan 0.12.100 4 weeks ago
phpstan.phar.asc PHPStan 0.12.100 4 weeks ago

PHPStan - PHP Static Analysis Tool


Build Status Latest Stable Version Total Downloads License PHPStan Enabled

PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code can be checked before you run the actual line.

Read more about PHPStan in an introductory article »

Try out PHPStan on the on-line playground! »


TheCodingMachine     Private Packagist
Intracto     TicketSwap
ShipMonk     Togetter
RightCapital     ContentKing
ZOL     Stepan Kocourek
Shopware     Craft CMS

You can now sponsor my open-source work on PHPStan through GitHub Sponsors.

Does GitHub already have your 💳? Do you use PHPStan to find 🐛 before they reach production? Send a couple of 💸 a month my way too. Thank you!

One-time donations through PayPal are also accepted. To request an invoice, contact me through e-mail.


All the documentation lives on the website:

PHPStan Pro

PHPStan Pro is a paid add-on on top of open-source PHPStan Static Analysis Tool with these premium features:

  • Web UI for browsing found errors, you can click and open your editor of choice on the offending line.
  • Continuous analysis (watch mode): scans changed files in the background, refreshes the UI automatically.
  • Interactive fixer: lets you choose the right fix for found errors 😊

Try it on PHPStan 0.12.45 or later by running it with the --pro option. You can create an account either by following the on-screen instructions, or by visiting

After 30-day free trial period it costs 7 EUR for individuals monthly, 70 EUR for teams (up to 25 members). By paying for PHPStan Pro, you're supporting the development of open-source PHPStan.

You can read more about it on PHPStan's website.

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code.


Any contributions are welcome. PHPStan's source code open to pull requests lives at phpstan/phpstan-src.