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

 ID:                 54011
 Updated by:         il...@php.net
 Reported by:        j dot henge-ernst at interexa dot de
 Summary:            array_merge_recursive does not use free numeric keys
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Arrays related
 Operating System:   linux
 PHP Version:        5.3.5
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php




Previous Comments:
------------------------------------------------------------------------
[2011-02-14 09:12:44] j dot henge-ernst at interexa dot de

Description:
------------
If you use array_merge_recursive to join arrays which have different
numeric keys, free keys are nor used if the later array has a key which
is below the first/highest key.

Test script:
---------------
var_dump(array_merge_recursive(

array("a" => array(5 => "7")),

array("a" => array(3 => "8"))

));'



Expected result:
----------------
array(1) {

  ["a"]=>

  array(2) {

    [3]=>

    string(1) "8"

    [5]=>

    string(1) "7"

  }

}



Actual result:
--------------
array(1) {

  ["a"]=>

  array(2) {

    [5]=>

    string(1) "7"

    [6]=>

    string(1) "8"

  }

}




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



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

Reply via email to