.. _cannot-use-the-static-modifier-on-a-parameter: Cannot use the static modifier on a parameter --------------------------------------------- .. meta:: :description: Cannot use the static modifier on a parameter: It is not possible to use ``static`` as a type for a parameter. :og:image: https://php-errors.readthedocs.io/en/latest/_static/logo.png :og:type: article :og:title: Cannot use the static modifier on a parameter :og:description: It is not possible to use ``static`` as a type for a parameter :og:url: https://php-errors.readthedocs.io/en/latest/messages/cannot-use-the-static-modifier-on-a-parameter.html :og:locale: en :twitter:card: summary_large_image :twitter:site: @exakat :twitter:title: Cannot use the static modifier on a parameter :twitter:description: Cannot use the static modifier on a parameter: It is not possible to use ``static`` as a type for a parameter :twitter:creator: @exakat :twitter:image:src: https://php-errors.readthedocs.io/en/latest/_static/logo.png .. raw:: html Description ___________ It is not possible to use ``static`` as a type for a parameter. It is possible for a return value, but not for parameters, not properties. Example _______ .. code-block:: php Solutions _________ + Use self pseudo-type. + Use the name of the class as type. + Use one of the interface as type. Changed Behavior ________________ This error may appear following an evolution in behavior, in previous versions. See ` `_.