From: s dot masugata at digicom dot dnp dot co dot jp
Operating system: Linux/Solaris(sparc)
PHP version: 4.3.4
PHP Bug Type: mbstring related
Bug description: array which mb_convert_variables does not specify is changed.
Description:
------------
Array which mb_convert_variables does not specify is
changed.
I think that this operation is not specification but
a bug with it being individual.
Isn't it changed about this operation by PHP4.3.5 or
it or later?
Reproduce code:
---------------
<?
// no problem.
$Str1 = "multi-byte string's";
$Str2 = $Str1;
mb_convert_variables( "SJIS",
mb_detect_order( ),
$Str2 );
var_dump( $Str1 );
var_dump( $Str2 );
// unexpected operation.
$Array1 = array( "multi-byte string's" );
$Array2 = $Array1;
mb_convert_variables( "SJIS",
mb_detect_order( ),
$Array2 );
var_dump( $Array1 );
var_dump( $Array2 );
?>
Expected result:
----------------
string(4) "no changed multi-byte string's"
string(3) "changed multi-byte string's"
array(1) {
[0]=>
string(3) "no changed multi-byte string's"
}
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
Actual result:
--------------
string(4) "no changed multi-byte string's"
string(3) "changed multi-byte string's"
array(1) {
[0]=>
string(4) "no changed multi-byte string's"
}
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
string(4) "no changed multi-byte string's"
string(3) "changed multi-byte string's"
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
--
Edit bug report at http://bugs.php.net/?id=26639&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26639&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26639&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26639&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26639&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26639&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26639&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26639&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26639&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26639&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26639&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26639&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26639&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26639&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26639&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26639&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26639&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26639&r=float