.. _functions-useconstantsasreturns: .. _use-constants-as-returns: Use Constants As Returns ++++++++++++++++++++++++ When a native PHP function returns only constants, it is recommended to use those constants to identify the returned values. .. code-block:: php Suggestions ___________ * Use the valid constants to identify the results Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Functions/UseConstantsAsReturns | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.3.9 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+