.. _case-can-only-be-used-in-enums: Case can only be used in enums ------------------------------ .. meta:: :description: Case can only be used in enums: ``case`` is a keyword which is reserved for enumerations ``enum``. :og:image: https://php-errors.readthedocs.io/en/latest/_static/logo.png :og:type: article :og:title: Case can only be used in enums :og:description: ``case`` is a keyword which is reserved for enumerations ``enum`` :og:url: https://php-errors.readthedocs.io/en/latest/messages/case-can-only-be-used-in-enums.html :og:locale: en :twitter:card: summary_large_image :twitter:site: @exakat :twitter:title: Case can only be used in enums :twitter:description: Case can only be used in enums: ``case`` is a keyword which is reserved for enumerations ``enum`` :twitter:creator: @exakat :twitter:image:src: https://php-errors.readthedocs.io/en/latest/_static/logo.png .. raw:: html Description ___________ ``case`` is a keyword which is reserved for enumerations ``enum``. It cannot be used in other structures, such as traits, interfaces or classes. Example _______ .. code-block:: php Solutions _________ + Make the class an enumeration. + Remove the case from the class.