phpstan/phpstan

Created Dec 13, 2020 · View the phpstan/phpstan repository page

PHP Static Analysis Tool - discover bugs in your code without running it!

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

About phpstan/phpstan

PHPStan is a static analysis tool for PHP that detects bugs and errors in code without executing it. By analyzing your codebase, it identifies entire classes of bugs before tests are written, bringing PHP closer to the level of type safety found in compiled languages. The tool catches correctness issues on a line-by-line basis during the analysis phase rather than at runtime.

The project provides comprehensive documentation covering getting started, configuration, PHPDoc types, and extension development. PHPStan includes an interactive online playground where developers can try the tool before installing it locally. The core functionality is open-source and free to use, with contributions welcomed through pull requests in the phpstan-src repository.

PHPStan Pro is an optional paid subscription tier that adds a web UI for browsing errors and continuous analysis features like watch mode for real-time file scanning. Individual subscriptions cost 7 EUR monthly while team plans (up to 25 members) cost 70 EUR monthly, with a 30-day free trial available. The project is actively maintained and supported by a community of sponsors at gold, silver, and bronze levels.

Share this video