.. _php-reservedmatchkeyword: .. _reserved-match-keyword: Reserved Match Keyword ++++++++++++++++++++++ ``match`` is a new instruction in PHP 8.0. For that, it becomes a reserved keyword, and cannot be used in various situations: type, class, function, global constant name. .. code-block:: php match; C::MATCH; // Match as a method is OK $method->match(); $static::match(); ?> See also `Match expression V2 `_. Related PHP errors ------------------- + `0 `_ + `1 `_ Connex PHP features ------------------- + `match `_ Suggestions ___________ * Change the name from Match to something else. Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Php/ReservedMatchKeyword | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`CompatibilityPHP80 ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.2.1 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | With PHP 8.0 and older | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Major | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Related rule | :ref:`uses-php-8-match()` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+