.. _structures-strposlessthanone: .. _strpos()-less-than-one: Strpos() Less Than One ++++++++++++++++++++++ This rule reports a comparison of `strpos() `_ or `stripos() `_ with 1. This is a variable of `strpos() `_ == 0, since both false and 0 are processed the same way. Yet, 0 might be a valid value. This rule was suggested by Yann Ouche. .. code-block:: php Suggestions ___________ * Make sure that the 2 cases are valid business cases. Specs _____ +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/StrposLessThanOne | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`Surprising ` | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.6.6 | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+