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