.. _php-isnullvsequalnull: .. _use-===-null: Use === null ++++++++++++ It is faster to use === null than the function `is_null() `_. This is a micro-optimisation. And being used frequently, and in loops, it may yield visible speed up. .. code-block:: php See also `is_null `_. Connex PHP features ------------------- + `strict-comparison `_ + `null `_ Suggestions ___________ * Use === comparison instead of is_null Specs _____ +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Php/IsnullVsEqualNull | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`CE `, :ref:`CI-checks `, :ref:`Changed Behavior `, :ref:`php-cs-fixable ` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ClearPHP | `avoid-those-slow-functions `__ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Community Edition `_, `Exakat Cloud `_ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+