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. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB 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. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  10. PHP Code Sniffer

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

    Project mention: Build a Symfony 7 boilerplate using FrankenPHP, Docker, PostgreSQL and php 8.4 | dev.to | 2024-12-23

    To do so simply install the runtime/frankenphp-symfony composer package. Then we install the bare minimum for a kick ass developer experience, a linter using Code Sniffer, phpstan as code quality audit tool, Rector to ease and automate code maintenance, some useful Symfony components and package and of course the Doctrine ORM. Here the composer.json file located at the symfony folder root.

  11. PHP Architecture Tester

    ✔️ PHP Architecture Tester - Easy architecture testing for PHP

  12. php-language-server

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

  13. enlightn

    Your performance & security consultant, an artisan command away.

  14. 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.

  15. BackwardCompatibilityCheck

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

  16. phpmnd

    PHP Magic Number Detector

  17. phpstan-deprecation-rules

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

  18. unused-scanner

    Detect unused composer dependencies

  19. Exakat

    The Exakat Engine : smart static analysis for PHP

  20. psalm-plugin-laravel

    A Psalm plugin for Laravel

  21. phpstan-disallowed-calls

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

  22. phpstan-wordpress

    WordPress extensions for PHPStan ⛏️

  23. phpstan-dba

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

  24. phpstan-drupal

    Extension for PHPStan to allow analysis of Drupal code.

  25. functional

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

  26. SaaSHub

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

    SaaSHub logo
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

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 | 22 Dec 2025
    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,393
2 PHPStan 13,742
3 PHP CS Fixer 13,400
4 Psalm 5,786
5 phan 5,601
6 PHP Mess Detector 2,406
7 PHPCompatibility 2,268
8 PHP Code Sniffer 1,417
9 PHP Architecture Tester 1,229
10 php-language-server 1,180
11 enlightn 984
12 phpstan-strict-rules 676
13 BackwardCompatibilityCheck 591
14 phpmnd 577
15 phpstan-deprecation-rules 439
16 unused-scanner 430
17 Exakat 379
18 psalm-plugin-laravel 324
19 phpstan-disallowed-calls 320
20 phpstan-wordpress 316
21 phpstan-dba 285
22 phpstan-drupal 206
23 functional 199

Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com

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