|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-12-16 06:42 UTC] s dot masugata at digicom dot dnp dot co dot jp
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"
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
sorry, Actual result was wrong. Actual result: -------------- 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" }