#28466 [Opn->Asn]: mb_convert_variables() clutters variables beyond the references, again.

From: Date: Mon, 24 May 2004 01:37:57 +0000
Subject: #28466 [Opn->Asn]: mb_convert_variables() clutters variables beyond the references, again.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59924@lists.php.net to get a copy of this message
ID: 28466 Updated by: moriyoshi@php.net Reported By: s dot masugata at digicom dot dnp dot co dot jp -Status: Open +Status: Assigned Bug Type: mbstring related Operating System: FreeBSD/Linux/Solaris(sparc) PHP Version: 4.3.6 -Assigned To: +Assigned To: moriyoshi New Comment: Please don't create a new entry when it is closely related to the one that already exists. Add comments to that one. Previous Comments: ------------------------------------------------------------------------ [2004-05-21 07:43:17] s dot masugata at digicom dot dnp dot co dot jp Description: ------------ See:http://bugs.php.net/bug.php?id=26639 Although the usual array is satisfactory, if array becomes a nest, it is still useless. Reproduce code: --------------- <? // no problem. $Array1 = array( "multi-byte string's" ); $Array2 = $Array1; mb_convert_variables( "SJIS", mb_detect_order( ), $Array2 ); var_dump( $Array1 ); var_dump( $Array2 ); // unexpected operation. $Array1 = array( "multi-byte string's", array( "multi-byte string's" ) ); $Array2 = $Array1; mb_convert_variables( "SJIS", mb_detect_order( ), $Array2 ); var_dump( $Array1 ); var_dump( $Array2 ); ?> Expected result: ---------------- array(1) { [0]=> string(3) "no changed multi-byte string's" } array(1) { [0]=> string(3) "changed multi-byte string's" } array(1) { [0]=> string(3) "no changed multi-byte string's" [1]=> array(1) { [0]=> string(4) "no changed multi-byte string's" } } array(1) { [0]=> string(3) "changed multi-byte string's" [1]=> array(1) { [0]=> string(4) "changed multi-byte string's" } } Actual result: -------------- array(1) { [0]=> string(3) "no changed multi-byte string's" } array(1) { [0]=> string(3) "changed multi-byte string's" } array(1) { [0]=> string(3) "no changed multi-byte string's" [1]=> array(1) { [0]=> string(4) "changed multi-byte string's" } } array(1) { [0]=> string(3) "changed multi-byte string's" [1]=> array(1) { [0]=> string(4) "changed multi-byte string's" } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28466&edit=1

« previous php.bugs (#59924) next »