Error in SonarQube 7.7 when analyzing a php project

  • Versions: SonarQube 7.7, Scanner, Plugin PHP

  • Error observed: Error during SonarQube Scanner execution

  at org.sonar.php.checks.IdenticalOperandsInBinaryExpressionCheck.visitBinaryExpression(IdenticalOpe 
  at org.sonar.php.tree.impl.expression.BinaryExpressionTreeImpl.accept(
  at org.sonar.plugins.php.api.visitors.PHPVisitorCheck.scan(

when I analyze a php project I get this error, preventing the process from ending and I can see the result of the analysis.

in the project path I have the following file:, inside this file I have the following code:

Hello Alejandro,

Thank you for your feedback.
The issue seems to be coming from the PHP “Identical expressions should not be used on both sides of a binary operator” rule.
You can try to disable this rule temporarily, to see if the analysis finishes successfully without it.

If that’s the case, it would then be really helpful if you could identify the source file being analyzed that is causing the problem and share with us a small reproducer highlighting the problem. Without knowing the pattern that makes the plugin fail, it is hard for us to investigate the root of your issue.