Bug #51567 [Opn->Bgs]: numerically indexed php arrays bug

From: Date: Fri, 16 Apr 2010 04:11:32 +0000
Subject: Bug #51567 [Opn->Bgs]: numerically indexed php arrays bug
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-149600@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51567&edit=1

 ID:               51567
 Updated by:       rasmus@php.net
 Reported by:      msbullshit at hotmail dot com
 Summary:          numerically indexed php arrays bug
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          *XML functions
 Operating System: OSX, FreeBSD
 PHP Version:      5.3.2

 New Comment:

You are not using PHP-5.3.2 then.  This was fixed in that version.  Just
verified 
it here.


Previous Comments:
------------------------------------------------------------------------
[2010-04-16 01:41:35] msbullshit at hotmail dot com

Description:
------------
Many people have complained about the indexed array bug already. Will
this bug 
ever be fixed?

The keys are lost if they have a numeric value even if they are set to
type 
string.

There was said that it wont be fixed:
http://bugs.php.net/21949
http://bugs.php.net/37746

There was said that it was fixed:
http://bugs.php.net/50285
http://phpxmlrpc.sourceforge.net/news.html

However it wasn't fixed. I still have the problem on PHP 5.3.1.

Test script:
---------------
<?
$a=array(1=>'one', '3'=>'three', 5=>'five',
'a'=>'foo');
print_r($a);
print_r(xmlrpc_decode(xmlrpc_encode($a)));
?>

Expected result:
----------------
Array
(
    [1] => one
    [3] => three
    [5] => five
    [a] => foo
)
Array
(
    [1] => one
    [3] => three
    [5] => five
    [a] => foo
)

Actual result:
--------------
Array
(
    [1] => one
    [3] => three
    [5] => five
    [a] => foo
)
Array
(
    [0] => one
    [1] => three
    [2] => five
    [a] => foo
)


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51567&edit=1


Thread (3 messages)

« previous php.bugs (#149600) next »