Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

Head-to-head · Static Type Checkers

PHPStan vs pytype

  • Updated Dec 2026
  • Both researched from official sources
  • 2 checks side by side
Higher score PHPStan #5 in Static Type Checkers 8.8/10 Free plan · 30-day trial Free planFree trial✓ 1 of 4 features Visit PHPStan
pytype #7 in Static Type Checkers 8.1/10 Free plan Free plan✓ 1 of 4 features Visit pytype

PHPStan leads on 0 checks, pytype on 0, and 2 are even. Who comes out ahead on the 2 yes/no, price and count checks where we have data for both products. The editor score weighs everything else too.

Our verdict

  • Highest scorePHPStan · 8.8/10
  • Free planboth
  • Free trialonly PHPStan

PHPStan scores higher on our rubric for static type checkers: 8.8 against 8.1 out of 10; our editors rank them #5 and #7.

PHPStan is the better fit for PHP teams needing configurable, CI-ready analysis. pytype is the better fit for python developers who want annotation-free type inference.

  • PHPStan fits best

    PHP teams needing configurable, CI-ready analysis

  • pytype fits best

    Python developers who want annotation-free type inference

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.

Side by side

Feature PHPStan 8.8/10 Visit ↗ pytype 8.1/10 Visit ↗
At a glance
Editor score 8.8 8.1
Ranking #5 in Static Type Checkers #7 in Static Type Checkers
Best for PHP teams needing configurable, CI-ready analysis Python developers who want annotation-free type inference
Pricing model Free plan + paid Free
Starting price Free plan · 30-day trial Free plan
Free plan ✓ ✓
Free trial 30 days —
Deployment Self-hosted Self-hosted
Support Docs, Community Community, Docs
Integrations 8 integrations 1 integrations
Built for Solo, Small business, Mid-market, Enterprise Solo, Small business, Mid-market, Enterprise
Features PHPStan 1/4 · pytype 1/4
IDE plugins Not checked yet Not checked yet
CI/CD integration ✓ ✓
Incremental analysis Not checked yet Not checked yet
Strictness controls Not checked yet Not checked yet
Specs
Supported languages Not checked yet Not checked yet
Analysis scope Not checked yet Not checked yet
License model Not checked yet Not checked yet
Our review
Pros
  • 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
  • Infers types in unannotated code and checks annotations where they exist.
  • Analyzes code across files and narrows types based on control flow.
  • Generates .pyi files and can merge their type information into source.
Cons
  • 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
  • Checks Python only, so it cannot cover a mixed-language codebase on its own.
  • Windows use is through WSL.
  • Python 3.12 is marked unsupported.
Our verdict

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…

Read the review →

You don’t have to annotate a Python codebase before pytype can check it. The free, open-source command-line analyzer infers types where annotations are absent and checks the annotations you’ve already written. That makes it a practical…

Read the review →
  1. PHPStanStatic Type Checkers 8.8Free plan · 30-day trial
  2. pytypeStatic Type Checkers 8.1Free plan

Strengths and trade-offs

  • PHPStan — 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
  • pytype — where it wins

    • Infers types in unannotated code and checks annotations where they exist.
    • Analyzes code across files and narrows types based on control flow.
    • Generates .pyi files and can merge their type information into source.

    Where it doesn't

    • Checks Python only, so it cannot cover a mixed-language codebase on its own.
    • Windows use is through WSL.
    • Python 3.12 is marked unsupported.
  • PHPStan8.8/10 · Free plan · 30-day trial

    A good fit for PHP teams that want to tighten type checks gradually and run them in CI.

    Visit PHPStanFull verdict →
  • pytype8.1/10 · Free plan

    A free, open-source checker for Python projects that want type inference without adding annotations first.

    Visit pytypeFull verdict →

PHPStan vs pytype: questions

Which is better for static type checkers, PHPStan or pytype?

PHPStan scores higher on our rubric for static type checkers: 8.8 against 8.1 out of 10; our editors rank them #5 and #7.

Do PHPStan and pytype have a free plan?

PHPStan: Yes. pytype: Yes.

Where do PHPStan and pytype rank among static type checkers?

In our static type checkers ranking of 25, PHPStan is #5 and pytype is #7.

More comparisons

Reviewed by iTechGuides Editors · Editorial team · Updated Dec 2026

Last updated · How we research and update