Bug #68919 [Opn->Nab]: the binary cast returns string

From: Date: Tue, 27 Jan 2015 12:58:19 +0000
Subject: Bug #68919 [Opn->Nab]: the binary cast returns string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190246@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68919&edit=1 ID: 68919 Updated by: nikic@php.net Reported by: wallacemaxters at gmail dot com Summary: the binary cast returns string -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: Windows 7 PHP Version: 5.4.37 Block user comment: N Private report: N New Comment: (binary) is a forward-compatibility token for the now abandoned PHP 6. It behaves the same way as doing a (string) cast in PHP 5. Previous Comments: ------------------------------------------------------------------------ [2015-01-27 12:34:12] wallacemaxters at gmail dot com Description: ------------ I'm having trouble using the Binary Cast. When I try to use the Cast to convert a string (or any other amount) in binary, the result is always the initial. Even used the example of this page: http://php.net/manual/pt_BR/language.types.type-juggling.php And nothing worked as it should. I did the tests both in 5.14.17 PHP as of PHP 5.6. The results were the same. Test script: --------------- <?php $string = "My Simple String"; var_dump((binary) $string; // string(16) "My Simple String" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68919&edit=1

« previous php.bugs (#190246) next »