#1111th of 34 in Code review and testing

phpstan

Static analyzer that finds bugs in PHP code without running it

Stars
14.2k
License
MIT
Last commit
Nov 2026
Last release
Nov 2026
Language
PHP
Stars, last 29 weeks+308
21 Apr 2026: 13,846 stars28 Apr 2026: 13,858 stars5 May 2026: 13,863 stars12 May 2026: 13,872 stars19 May 2026: 13,887 stars26 May 2026: 13,904 stars2 Jun 2026: 13,925 stars9 Jun 2026: 13,940 stars16 Jun 2026: 13,953 stars23 Jun 2026: 13,966 stars30 Jun 2026: 13,970 stars7 Jul 2026: 13,987 stars14 Jul 2026: 13,998 stars21 Jul 2026: 14,005 stars28 Jul 2026: 14,016 stars4 Aug 2026: 14,029 stars11 Aug 2026: 14,040 stars18 Aug 2026: 14,049 stars25 Aug 2026: 14,057 stars1 Sept 2026: 14,066 stars8 Sept 2026: 14,074 stars15 Sept 2026: 14,080 stars22 Sept 2026: 14,085 stars29 Sept 2026: 14,095 stars6 Oct 2026: 14,104 stars13 Oct 2026: 14,112 stars20 Oct 2026: 14,118 stars27 Oct 2026: 14,130 stars3 Nov 2026: 14,142 stars10 Nov 2026: 14,154 stars

13,846 on 21 Apr 202614,154 on 10 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

PHPStan checks PHP code for type and logic errors before execution, using PHPDoc types and extensions to widen what it can verify. It runs from the command line or CI. PHPStan Pro, a paid add-on, adds a web UI for browsing errors and a watch mode. The project does not use AI models.

Who it is for: PHP developers who want static type checking locally or in CI

Strengths

  • Catches classes of bugs without executing code or writing tests first
  • Online playground at phpstan.org/try for testing snippets without installing
  • Extension library and documented API for writing custom extensions
  • MIT-licensed with active releases; last release 2026-10-27

Weaknesses

  • PHP only; no other languages are analyzed
  • Web UI and watch mode require paid PHPStan Pro after a 30-day trial
  • Not an AI tool; it does not use or integrate language models
  • Source for pull requests lives in phpstan/phpstan-src, not this repository

What it needs

  • no GPU
  • Docker

Quick answers

Is phpstan open source?

Yes. Its code is on GitHub under the MIT license.

Can you run phpstan with Docker?

Yes. Its repository has a Docker setup: a Dockerfile, a Compose file or a published image.

Also in Code review and testing

See all 34
Also in Code review and testing
RankProjectScore
1playwrightCross-browser automation and end-to-end test framework for Chromium, Firefox and WebKit99.9k starsApache-2.094 out of 100
2nxMonorepo build system with task caching, affected-only runs and CI integration29.5k stars+124 (+0.4%) in 30 daysMIT92 out of 100
3open-code-reviewGo CLI that reviews Git diffs with an LLM agent and line-level comments49.8k stars+3,715 (+8.1%) in 30 daysApache-2.091 out of 100
#4bendDependent-typed language where AI-written code must prove rules in LAWS.bend Live demo ↗ (opens in a new tab)25k stars+1,462 (+6.2%) in 30 daysApache-2.087 out of 100
#5maestroYAML-based UI and end-to-end test framework for Android, iOS and web16.4k stars+393 (+2.5%) in 30 daysApache-2.087 out of 100