.. _functions-shoulduseconstants: .. _should-use-existing-constants: Should Use Existing Constants +++++++++++++++++++++++++++++ The following functions have related constants that should be used as arguments, instead of scalar literals, such as integers or strings. .. code-block:: php See also `Bitmask Constant Arguments in PHP `_. Connex PHP features ------------------- + `predefined-constant `_ + `constant `_ Suggestions ___________ * Use PHP native constants whenever possible, for better readability. Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Functions/ShouldUseConstants | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-tine20-functions-shoulduseconstants` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+