.. _non-canonical-cast-(integer)-is-deprecated,-use-the-(int)-cast-instead:
Non-canonical cast (integer) is deprecated, use the (int) cast instead
----------------------------------------------------------------------
.. meta::
:description:
Non-canonical cast (integer) is deprecated, use the (int) cast instead: The non-canonical cast ``(integer)`` has been deprecated.
:og:image: https://php-errors.readthedocs.io/en/latest/_static/logo.png
:og:type: article
:og:title: Non-canonical cast (integer) is deprecated, use the (int) cast instead
:og:description: The non-canonical cast ``(integer)`` has been deprecated
:og:url: https://php-errors.readthedocs.io/en/latest/messages/non-canonical-cast-%28integer%29-is-deprecated%2C-use-the-%28int%29-cast-instead.html
:og:locale: en
:twitter:card: summary_large_image
:twitter:site: @exakat
:twitter:title: Non-canonical cast (integer) is deprecated, use the (int) cast instead
:twitter:description: Non-canonical cast (integer) is deprecated, use the (int) cast instead: The non-canonical cast ``(integer)`` 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 ``(integer)`` has been deprecated. It should be replace by the simpler ``(int)``.
Example
_______
.. code-block:: php
Solutions
_________
+ Use ``(int)``.
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 `_.