Re: Array merge changes VALUE of keys, never mind the type

From: Date: Fri, 28 Sep 2001 17:09:21 +0000
Subject: Re: Array merge changes VALUE of keys, never mind the type
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-66774@lists.php.net to get a copy of this message
On Fri, 28 Sep 2001, Nick Lindridge wrote: > Hi, > > Regarding what seems an array merge bug. This was > quickly made bogus (:-), but I think that the > point was missed. The issue isn't that the key > was made numeric - I had it numeric and not a string > in the first place. The issue is that the key value > was changed. > > The array element key values had a meaning - otherwise > I wouldn't have bothered by using keys at all. > > array_merge should not change the value of keys. It should > just merge! If not a bug, it is a flaw. array_merge() does *not* change the value of keys. Period. -Andrei * Life may be expensive, but it includes an annual free trip around the sun. *

« previous php.dev (#66774) next »