| What it is | Static analysis for WordPress plugins and themes with PHPStan | PHP static analysis that finds bugs without running your code | A static analyzer for PHP that minimizes false positives | Adds code analysis to Laravel, improving developer productivity and code quality |
| Features | - loads php-stubs/wordpress-stubs
- dynamic return types for WordPress functions the stubs don't cover
- defines some WordPress core constants
- reads apply_filters() and do_action() docblocks, treating the first @param as the type
| - whole-codebase static analysis
- rule levels 0 to 10
- baseline for existing errors
- generics and array shapes in PHPDoc
- framework extensions for Symfony, Laravel and Doctrine
- result cache and parallel analysis
- PHPStan Pro web UI
| - type safety and arity checks on calls, operations and return values
- backward compatibility checks for PHP 8.1 to 8.6
- dead, unreachable and unused code detection, with automatic fixes for some issues
- union types, generics (@template), array shapes and PHPDoc annotations
- user and bundled plugins
- editor integration through the Language Server Protocol and a daemon mode
| - PHPStan extension for Laravel apps
- supports most of Laravel's magic
- finds bugs before tests are written
|