#42863 [Opn]: array_merge_recursive() magles values
| From: | moloth at hotmail dot com | Date: | Fri, 05 Oct 2007 14:27:24 +0000 |
| Subject: | #42863 [Opn]: array_merge_recursive() magles values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118215@lists.php.net to get a copy of this message | ||
ID: 42863
User updated by: moloth at hotmail dot com
Reported By: moloth at hotmail dot com
Status: Open
Bug Type: Arrays related
Operating System: all
PHP Version: 5.2.4
New Comment:
Changed Summary
Previous Comments:
------------------------------------------------------------------------
[2007-10-05 14:19:01] moloth at hotmail dot com
Changed to arrays related
------------------------------------------------------------------------
[2007-10-05 08:00:33] moloth at hotmail dot com
Description:
------------
Seems to increment number values.
Reproduce code:
---------------
<pre>
<?php
$a = array('a' => array('2' => '6'));
$b = array('a' => array('2' => '6'));
$result = array_merge_recursive( $a, $b );
print_r( $result );
?>
Expected result:
----------------
Array
(
[a] => Array
(
[2] => 6
)
)
Actual result:
--------------
Array
(
[a] => Array
(
[2] => 6
[3] => 6
)
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42863&edit=1