.. _structures-setlocaleneedsconstants: .. _setlocale()-uses-constants: Setlocale() Uses Constants ++++++++++++++++++++++++++ `setlocale() `_ don't use strings but constants. The first argument of `setlocale() `_ must be one of the valid constants, ``LC_ALL``, ``LC_COLLATE``, ``LC_CTYPE``, ``LC_MONETARY``, ``LC_NUMERIC``, ``LC_TIME, `LC_MESSAGES `_``. The PHP 5 usage of strings (same name as above, enclosed in ' or ") is not legit anymore in PHP 7 and later. .. code-block:: php See also `setlocale `_. Suggestions ___________ * Use setlocale() constants Specs _____ +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/SetlocaleNeedsConstants | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`CompatibilityPHP70 ` | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Major | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Instant (5 mins) | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+--------------------------------------------------------------------------------------------------------------------------------------+