Non-canonical cast (binary) is deprecated, use the (string) cast instead¶
Description¶
The non-canonical cast (binary) has been deprecated. It should be replace by the simpler (string).
Example¶
<?php
$a = (binary) $string;
?>
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.