.. _functions-unknownparametername: .. _unknown-parameter-name: Unknown Parameter Name ++++++++++++++++++++++ The name of the parameter doesn't belong to the method signature. Named arguments were introduced in PHP 8.0. Named arguments errors will also arise when spreading a hash array with arbitrary number of arguments. For example, with `array_merge() `_, the array should not use named keys. .. code-block:: php [1], 'b' => [2]]); ?> See also `Named Arguments `_ and :ref:`Wrong Argument Name With PHP Function `. Related PHP errors ------------------- + `Unknown named parameter $d in `_ + `array_merge() does not accept unknown named parameters `_ Connex PHP features ------------------- + `named-parameter `_ Suggestions ___________ * Fix the name of the parameter and use a valid one * Remove the parameter name, and revert to positional notation Specs _____ +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Functions/UnknownParameterName | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`CE `, :ref:`CI-checks `, :ref:`Changed Behavior ` | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.1.6 | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | With PHP 8.0 and more recent | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Community Edition `_, `Exakat Cloud `_ | +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+