|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-09-10 11:53 UTC] bmansion at mamasam dot com
Description: ------------ When the index in the array is a string like "1234567890", I mean containing only figures, array_merge will convert it to an int and change the index by resetting the value. 2 options: Make our own array_merge function. PHP Team fix array_merge so that it keep track of the index type. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 08:00:02 2025 UTC |
The Category should be changed and the bug should be retitled, because this is a general bug, not related to PEAR, and not related to HTML_QuickForm. Problem I have: $ar = array ('-999'=>'a',0=>'b',1=>'c'); $ar2 = array ('x'=>'x','y'=>'y','z'=>'z'); print_r(array_merge($ar,$ar2)); results in a version prior to 4.3.3 to Array ( [-999] => c [0] => b [1] => a [x] => x [y] => y [z] => z ) in version 4.3.3 to [0] => a [1] => b [2] => c [x] => x [y] => y [z] => z )