.. _php-nonullfornative: .. _no-null-for-native-php-functions: No Null For Native PHP Functions ++++++++++++++++++++++++++++++++ Null is not acceptable anymore as an argument, for PHP native functions that require a non-nullable argument. Until PHP 8.1, it was magically turned into an empty string. .. code-block:: php See also `PHP RFC: Deprecate passing null to non-nullable arguments of internal functions `_. Related PHP errors ------------------- + `0 `_ Connex PHP features ------------------- + `null `_ Specs _____ +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Php/NoNullForNative | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`CompatibilityPHP81 `, :ref:`Deprecated ` | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.2.5 | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | With PHP 8.1 and more recent | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+