Hacker ApprovedDepartments

PHPStan

Hacker Approved

Ranked 4 of 12 static analyzers by recommenders

Free open-source static analysis tool for PHP that people say catches most issues before runtime and handles type definitions well.

Free open-source static analysis tool for PHP that people say catches most issues before runtime and handles type definitions well.

11 people gave an opinion

recommend it
11
criticize it
0
approval share
100%
Each figure is one person. RecommendsCriticizes

Recommended in 7 of 13 months

  1. November 2025: recommended
  2. December 2025: recommended
  3. January 2026: recommended
  4. February 2026: recommended
  5. March 2026: not recommended
  6. April 2026: not recommended
  7. May 2026: recommended
  8. June 2026: not recommended
  9. July 2026: recommended
  10. August 2026: recommended
  11. September 2026: not recommended
  12. October 2026: not recommended
  13. November 2026: not recommended (month in progress)

Why it carries the badge

  • 11 people recommend itNeeds 10 or more, met.
  • Nobody criticizes itNeeds 2 to 1 or better, met.
  • Recommended in 7 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Handles type definitions well

    “Phpstan deals well with type definitions”

    Comment from 23 May 2026 in “PHP's Oddities”

    “Tools like PHPStan work fine, but I'd love a typed language on top of PHP”

    Comment from 9 Jul 2026 in “TypeScript 7”
  • Catches issues before runtime

    “PHPstan catches 99% of issues before the runtime gets to it”

    Comment from 20 Nov 2025 in “PHP 8.5”

    “enforced by PHPStan (static analysis) at level max for rock‑solid reliability”

    Comment from 26 Dec 2025 in “Show HN: Open source, self-hosted AI nutritionist for diabetes (Laravel/React)”
  • Popular standard tool for PHP

    “PHPStan is one of the more popular tools to evaluate that stuff.”

    Comment from 28 May 2026 in “PHP's Oddities”

    “Just add phpcsfixer and phpstan like any sane project”

    Comment from 7 May 2026 in “Show HN: PHP-fts – Full-text search engine in pure PHP, no extensions”

Other static analyzers people recommend

The four most recommended other static analyzers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

PHPStan compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
zizmor19195%6—Approved
Semgrep141058%7——
clang-tidy14478%6—Approved
PHPStanThis page110100%7—Approved
SonarQube101343%6——
See all 12 static analyzers, ranked

What people said

9 of the 11 comments that mention it, newest first. Each links to the original comment.

“Tools like PHPStan work fine, but I'd love a typed language on top of PHP”

RecommendsComment from 9 Jul 2026 in “TypeScript 7”

“PHPStan is one of the more popular tools to evaluate that stuff.”

RecommendsComment from 28 May 2026 in “PHP's Oddities”

“phpdoc syntax should work with static analysis tools”

RecommendsComment from 23 May 2026 in “PHP's Oddities”

“Phpstan deals well with type definitions”

RecommendsComment from 23 May 2026 in “PHP's Oddities”

“Just add phpcsfixer and phpstan like any sane project”

RecommendsComment from 7 May 2026 in “Show HN: PHP-fts – Full-text search engine in pure PHP, no extensions”

“callable and iterable are pretty powerful, convenient, and safe”

RecommendsComment from 2 Feb 2026 in “Stop Using Pseudo-Types”

“Psalm has credible alternatives in PHPStan and now Mago”

RecommendsComment from 21 Jan 2026 in “Bending Spoons laid off almost everybody at Vimeo yesterday”

“enforced by PHPStan (static analysis) at level max for rock‑solid reliability”

RecommendsComment from 26 Dec 2025 in “Show HN: Open source, self-hosted AI nutritionist for diabetes (Laravel/React)”

“PHPstan catches 99% of issues before the runtime gets to it”

RecommendsComment from 20 Nov 2025 in “PHP 8.5”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.