Re: [RFC] Array unpacking with string keys

From: Date: Thu, 07 Jan 2021 19:18:46 +0000
Subject: Re: [RFC] Array unpacking with string keys
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-112805@lists.php.net to get a copy of this message
On Thu, Jan 7, 2021, at 5:30 AM, Nikita Popov wrote: > Hi internals, > > I'd like to propose that string keys be allowed when unpacking into arrays: > https://wiki.php.net/rfc/array_unpacking_string_keys > > Especially as unpacking in calls supports string keys now, I believe it is > time to drop this limitation for arrays as well. > > Regards, > Nikita Hard yes. I ran into a case just yesterday (while doing some sample code for immutability) when I wanted to merge associative arrays this way and the alternate was much yuckier. --Larry Garfield

« previous php.internals (#112805) next »