From: strike at true-vision dot net
Operating system: Fedora 8.0
PHP version: 6CVS-2009-03-17 (snap)
PHP Bug Type: Strings related
Bug description: strtr bug. Not replace unicode values from array, in binary
string.
Description:
------------
Found bug in function strtr...
Not replace unicode values from array, in binary string.
Reproduce code:
---------------
<php
$a = (binary)"AAA"; // In my code I use file_get_contents
// function retrun finary value
$b = array("AAA" => "BBB");
$c = strtr($a, $b);
var_dump($a);
var_dump($b);
var_dump($c);
?>
Expected result:
----------------
string(3) "AAA"
array(1) { [u"AAA"]=> unicode(3) "BBB" }
string(3) "AAA"
Actual result:
--------------
This is bug ?
--
Edit bug report at http://bugs.php.net/?id=47691&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47691&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47691&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47691&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47691&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47691&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47691&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47691&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47691&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47691&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47691&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47691&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47691&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47691&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47691&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47691&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47691&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47691&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47691&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47691&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47691&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47691&r=mysqlcfg