Need advice about which tool to choose?Ask the StackShare community!

PHPStan

151
78
+ 1
0
SonarQube

1.6K
1.8K
+ 1
49
Add tool

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.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of PHPStan
Pros of SonarQube
    Be the first to leave a pro
    • 25
      Tracks code complexity and smell trends
    • 16
      IDE Integration
    • 8
      Complete code Review

    Sign up to add or upvote prosMake informed product decisions

    Cons of PHPStan
    Cons of SonarQube
      Be the first to leave a con
      • 7
        Sales process is long and unfriendly
      • 7
        Paid support is poor, techs arrogant and unhelpful
      • 1
        Does not integrate with Snyk

      Sign up to add or upvote consMake informed product decisions

      What is PHPStan?

      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.

      What is SonarQube?

      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.

      Need advice about which tool to choose?Ask the StackShare community!

      Jobs that mention PHPStan and SonarQube as a desired skillset
      CBRE
      United States of America Texas Richardson
      What companies use PHPStan?
      What companies use SonarQube?
      See which teams inside your own company are using PHPStan or SonarQube.
      Sign up for StackShare EnterpriseLearn More

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with PHPStan?
      What tools integrate with SonarQube?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      What are some alternatives to PHPStan and SonarQube?
      ESLint
      A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
      Prettier
      Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
      TSLint
      An extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors. It is widely supported across modern editors & build systems and can be customized with your own lint rules, configurations, and formatters.
      Stylelint
      A mighty, modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.
      RuboCop
      RuboCop is a Ruby static code analyzer. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide.
      See all alternatives