.. _php-avoidreal: .. _avoid-real: Avoid Real ++++++++++ PHP has two float data type : real and double. ``real`` is rarely used, and might be deprecated in PHP 7.4. To prepare code, avoid using is_real() and the ``(real)`` typecast. .. code-block:: php See also `PHP RFC: Deprecations for PHP 7.4 `_. Related PHP errors ------------------- + `0 `_ + `1 `_ Connex PHP features ------------------- + `real `_ Suggestions ___________ * Replace is_real() by is_float() * Replace (real) by (float) Specs _____ +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Php/AvoidReal | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Suggestions `, :ref:`Top10 ` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 1.3.9 | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | With PHP 8.0 and older | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+