.. _non-canonical-cast-(double)-is-deprecated,-use-the-(float)-cast-instead:
Non-canonical cast (double) is deprecated, use the (float) cast instead
-----------------------------------------------------------------------
.. meta::
:description:
Non-canonical cast (double) is deprecated, use the (float) cast instead: The non-canonical cast ``(double)`` has been deprecated.
:og:image: https://php-errors.readthedocs.io/en/latest/_static/logo.png
:og:type: article
:og:title: Non-canonical cast (double) is deprecated, use the (float) cast instead
:og:description: The non-canonical cast ``(double)`` has been deprecated
:og:url: https://php-errors.readthedocs.io/en/latest/messages/non-canonical-cast-%28double%29-is-deprecated%2C-use-the-%28float%29-cast-instead.html
:og:locale: en
:twitter:card: summary_large_image
:twitter:site: @exakat
:twitter:title: Non-canonical cast (double) is deprecated, use the (float) cast instead
:twitter:description: Non-canonical cast (double) is deprecated, use the (float) cast instead: The non-canonical cast ``(double)`` has been deprecated
:twitter:creator: @exakat
:twitter:image:src: https://php-errors.readthedocs.io/en/latest/_static/logo.png
.. raw:: html
Description
___________
The non-canonical cast ``(double)`` has been deprecated. It should be replace by the simpler ``(float)``.
Example
_______
.. code-block:: php
Solutions
_________
+ Use ``(float)``.
Changed Behavior
________________
This error may appear following an evolution in behavior, in previous versions. See `nonCanonicalCast `_.
Static Analysis
_______________
This error may be tracked down with the following static analysis rules: `Php/NonCanonicalCast `_.