PHP Static Analysis

Open-source PHP projects categorized as Static Analysis

Top 23 PHP Static Analysis Projects

Static Analysis
  1. PHP Parser

    A PHP parser written in PHP

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. PHPStan

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

    Project mention: Running Rust Binaries on Shared Hosting: A Practical Approach to Type Safety on a Budget | dev.to | 2025-10-17

    I was tired of PHP's type system. Even with PHPStan and Psalm, there's no substitute for real compile-time guarantees. But I'm also practical - I don't want to pay for a VPS, maintain a server, manage security updates, configure databases, set up backups, and babysit infrastructure when shared hosting costs < $10/month and handles all of that for me.

  4. PHP CS Fixer

    A tool to automatically fix PHP Coding Standards issues

    Project mention: Formatting PHP Code with PHP CS Fixer | dev.to | 2025-12-18

    One of the tools you can use for formatting your PHP code is PHP CS Fixer. It's an incredibly popular tool and, at the time of writing, has over 214 million downloads on Packagist.

  5. Psalm

    A PHP static analysis tool for finding errors and security vulnerabilities in PHP applications

    Project mention: Running Rust Binaries on Shared Hosting: A Practical Approach to Type Safety on a Budget | dev.to | 2025-10-17

    I was tired of PHP's type system. Even with PHPStan and Psalm, there's no substitute for real compile-time guarantees. But I'm also practical - I don't want to pay for a VPS, maintain a server, manage security updates, configure databases, set up backups, and babysit infrastructure when shared hosting costs < $10/month and handles all of that for me.

  6. phan

    Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.

  7. PHP Mess Detector

    PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.

  8. PHPCompatibility

    PHP Compatibility check for PHP_CodeSniffer

  9. PHP Code Sniffer

    PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

  10. PHP Architecture Tester

    ✔️ PHP Architecture Tester - Easy architecture testing for PHP

  11. php-language-server

    PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥

  12. phpstan-strict-rules

    Extra strict and opinionated rules for PHPStan

    Project mention: PHPStan: Your Development Best Friend Who Actually Knows PHP Better Than You Do | dev.to | 2025-09-15

    Want even more strictness? The phpstan-strict-rules extension adds additional rules for defensive programming, including stricter array handling and more aggressive type checking.

  13. BackwardCompatibilityCheck

    :ab: Tool to compare two revisions of a class API to check for BC breaks

  14. phpmnd

    PHP Magic Number Detector

  15. phpstan-deprecation-rules

    PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.

  16. unused-scanner

    Detect unused composer dependencies

  17. Exakat

    The Exakat Engine : smart static analysis for PHP

  18. phpstan-disallowed-calls

    PHPStan rules to detect disallowed method & function calls, constant, namespace, attribute, keyword & superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

  19. psalm-plugin-laravel

    Laravel static analysis with built-in security scanning

  20. phpstan-wordpress

    WordPress extensions for PHPStan ⛏️

  21. phpstan-dba

    PHPStan based SQL static analysis and type inference for the database access layer

  22. phpstan-drupal

    Extension for PHPStan to allow analysis of Drupal code.

  23. functional

    PHP Functional Programming library. Monads, common use functions and generic collections.

  24. wordpress-stubs

    Up-to-date WordPress function and class declaration stubs for static analysis by PHPStan

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

PHP Static Analysis discussion

Log in or Post with

PHP Static Analysis related posts

  • Formatting PHP Code with PHP CS Fixer

    1 project | dev.to | 18 Dec 2025
  • Running Rust Binaries on Shared Hosting: A Practical Approach to Type Safety on a Budget

    2 projects | dev.to | 17 Oct 2025
  • PHPStan: Your Development Best Friend Who Actually Knows PHP Better Than You Do

    4 projects | dev.to | 15 Sep 2025
  • Mago: A fast PHP toolchain written in Rust

    11 projects | news.ycombinator.com | 13 Sep 2025
  • Enhancing Laravel Code Quality with Larastan

    2 projects | dev.to | 21 Aug 2025
  • Code Quality Check with PHPStan

    1 project | dev.to | 25 Jul 2025
  • PHP: errors to avoid with constructors

    2 projects | dev.to | 4 Mar 2025
  • A note from our sponsor - SaaSHub
    www.saashub.com | 11 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source Static Analysis projects in PHP? This list will help you:

# Project Stars
1 PHP Parser 17,439
2 PHPStan 13,983
3 PHP CS Fixer 13,528
4 Psalm 5,850
5 phan 5,615
6 PHP Mess Detector 2,426
7 PHPCompatibility 2,290
8 PHP Code Sniffer 1,513
9 PHP Architecture Tester 1,263
10 php-language-server 1,192
11 phpstan-strict-rules 699
12 BackwardCompatibilityCheck 597
13 phpmnd 583
14 phpstan-deprecation-rules 454
15 unused-scanner 426
16 Exakat 378
17 phpstan-disallowed-calls 333
18 psalm-plugin-laravel 334
19 phpstan-wordpress 330
20 phpstan-dba 294
21 phpstan-drupal 208
22 functional 202
23 wordpress-stubs 199

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

Did you know that PHP is
the 14th most popular programming language
based on number of references?