Re: [RFC Discussion] array_change_keys()

From: Date: Mon, 30 May 2016 03:35:31 +0000
Subject: Re: [RFC Discussion] array_change_keys()
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-93632@lists.php.net to get a copy of this message
> > Yes there is: > array_combine( > array_map($someFunc, array_keys($arr), $arr), > $arr > ) > This way $someFunc gets key as first argument and value as second. (you > might use array_values($arr) instead of $arr but I’m not sure it’s worth it) > Good call! I have updated the RFC to include this example as it best matches the behavior of the proposed function. Regards, Colin

« previous php.internals (#93632) next »