.. _php-lettercharslogicalfavorite: .. _logical-operators-favorite: Logical Operators Favorite ++++++++++++++++++++++++++ PHP has two sets of logical operators : letters (and, or, xor) and chars (&&, ||, ^). The analyzed code has less than 10% of one of the two sets : for consistency reasons, it is recommended to make them all the same. Warning : the two sets of operators have different precedence levels. Using and or && is not exactly the same, especially and not only, when assigning the results to a variable. Using and or && are also the target of other analysis. .. code-block:: php See also `Logical Operators `_ and `Operators Precedence `_. Connex PHP features ------------------- + `logical-operator `_ Suggestions ___________ * Pick a favorite, and enforce it Specs _____ +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Php/LetterCharsLogicalFavorite | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Preferences `, :ref:`Top10 ` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.12.4 | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+