.. _php-reservednames: .. _php-keywords-as-names: PHP Keywords As Names +++++++++++++++++++++ PHP has a set of reserved keywords. It is recommended not to use those keywords for names structures. PHP does check that a number of structures, such as classes, methods, interfaces... can't be named or called using one of the keywords. However, in a few other situations, no check are enforced. Using keywords in such situation is confusing. .. code-block:: php +---------------+---------+--------+------------------------------------------------------------------------------------+ | Name | Default | Type | Description | +---------------+---------+--------+------------------------------------------------------------------------------------+ | reservedNames | | string | Other reserved names : all in a string, comma separated. | +---------------+---------+--------+------------------------------------------------------------------------------------+ | allowedNames | | string | PHP reserved names that can be used in the code. All in a string, comma separated. | +---------------+---------+--------+------------------------------------------------------------------------------------+ See also `List of Keywords `_, `Predefined Classes `_, `Predefined Constants `_, `List of other reserved words `_ and `Predefined Variables `_. Connex PHP features ------------------- + `reserved-name `_ Suggestions ___________ * Rename the structure * Choose another naming convention to avoid conflict and rename the current structures Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Php/ReservedNames | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Semantics ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Major | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-churchcrm-php-reservednames`, :ref:`case-xataface-php-reservednames` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+