PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Incompatible bitwise mask operation

Last modified: 13 May 2022

Reports a bitwise mask expression which for sure evaluates to true or false. Expressions are of the form (var & constant1) == constant2 or (var | constant1) == constant2, where constant1 and constant2 are incompatible bitmask constants.

Example: