Sonarqube: It is main widely-known option for static code analysis. It incorporates thousands of automated code analysis rules, protecting code on multiple fronts, and guiding development teams toward quality. They also provide an IDE extension, Sonar lint which works well to supplement the CI offerings.
PHPStan:: It is a static code analysis tool that focuses on finding errors in the source code without having to actually run it. It catches whole classes of bugs even before you write tests for the code. PHPStan might be the most commonly used tool and also one of the newest.
PHP_CodeSniffer:: It is a very popular tool used for enforcing coding standards in PHP projects. It analyzes your PHP code and reports any violations of predefined standards, helping developers ensure consistent and readable code. It works by basically parsing your PHP code and checking it against a set of rules defined in coding standard rulesets. These rulesets can be based on popular coding standards such as PSR-1, PSR-2, and PSR-12 or customized according to specific project requirements. The tool detects deviations from the coding standards and provides detailed reports.
Pslam:: It is another great static code analysis tool for finding errors in PHP codebases. It was released in 2016 and has grown in popularity a little more slowly than others. This tool also fixes bugs automatically, allowing developers to improve their code without too much extra work.
PHPCheckstyle:: It is a static code analysis tool used in software development. Its main purpose is checking whether PHP source code complies with coding rules. It basically automates the lengthy process of checking code and helps PHP developers enforce coding standards.
Scrutinizer:: It is another widely used analysis tool. It seamlessly integrates into the software development workflow, and continuously builds and deploys application code. It’s free for open-source projects but is only available as a hosted solution. This makes Scrutinizer the most popular option for open-source development.