Bug #68919 [NEW]: the binary cast returns string

From: Date: Tue, 27 Jan 2015 12:34:12 +0000
Subject: Bug #68919 [NEW]: the binary cast returns string
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190244@lists.php.net to get a copy of this message
From: wallacemaxters at gmail dot com Operating system: Windows 7 PHP version: 5.4.37 Package: *General Issues Bug Type: Bug Bug description:the binary cast returns string 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 bug report at https://bugs.php.net/bug.php?id=68919&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68919&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68919&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68919&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68919&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68919&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68919&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68919&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68919&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68919&r=support Expected behavior: https://bugs.php.net/fix.php?id=68919&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68919&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68919&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68919&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68919&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68919&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68919&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68919&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68919&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68919&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68919&r=mysqlcfg

« previous php.bugs (#190244) next »