Re: [RFC Discussion] array_change_keys()

From: Date: Sun, 29 May 2016 17:54:21 +0000
Subject: Re: [RFC Discussion] array_change_keys()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-93626@lists.php.net to get a copy of this message
> > The RFC states "The new array returned by this function will contain the > same values in the same order, but with potentially different keys." > > But further down it states, that on multiple times the same key the last > one will "win". So in that special case it's **not** the same array > anymore. Or did I miss something? > You're right, I didn't word that first part very well. I've revised the RFC to mention the two "exceptions to the rule" earlier. Essentially this function is going to mirror the behavior of array_flip() whenever an invalid or duplicate key is encountered. Thanks for catching that! Colin

« previous php.internals (#93626) next »