.. _functions-noreferencedvoid: .. _no-referenced-void: No Referenced Void ++++++++++++++++++ There is no point returning a reference with a void type. This is now reported as deprecated in PHP 8.1. .. code-block:: php See also `PHP RFC: Deprecations for PHP 8.1 `_. Related PHP errors ------------------- + `Returning by reference from a void function is deprecated `_ Connex PHP features ------------------- + `void `_ + `reference `_ Suggestions ___________ * Removes the reference operator from the function definition Specs _____ +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Functions/NoReferencedVoid | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`CompatibilityPHP81 `, :ref:`Deprecated ` | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.2.4 | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Instant (5 mins) | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+