Need advice about which tool to choose?Ask the StackShare community!
SonarQube vs PHPStan: What are the differences?
SonarQube: Continuous Code Quality. SonarQube provides an overview of the overall health of your source code and even more importantly, it highlights issues found on new code. With a Quality Gate set on your project, you will simply fix the Leak and start mechanically improving; PHPStan: PHP Static Analysis Tool - discover bugs in your code without running it!. It focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code can be checked before you run the actual line.
SonarQube and PHPStan can be categorized as "Code Review" tools.
Some of the features offered by SonarQube are:
- Multi-language
- Detect tricky issues
- Security analysis
On the other hand, PHPStan provides the following key features:
- Static Analysis Tool
- Focuses on finding errors in your code without actually running it
- Extensible
SonarQube and PHPStan are both open source tools. PHPStan with 7.35K GitHub stars and 535 forks on GitHub appears to be more popular than SonarQube with 3.96K GitHub stars and 1.11K GitHub forks.
Pros of PHPStan
Pros of SonarQube
- Tracks code complexity and smell trends25
- IDE Integration16
- Complete code Review8
Sign up to add or upvote prosMake informed product decisions
Cons of PHPStan
Cons of SonarQube
- Sales process is long and unfriendly7
- Paid support is poor, techs arrogant and unhelpful7
- Does not integrate with Snyk1