On Sat, Jan 16, 2016 at 9:32 PM, Andrea Faulds <a...@ajf.me> wrote: > Hi everyone, > > Here's an RFC that would extend the syntax of list() to be more useful > with associative arrays: > > https://wiki.php.net/rfc/list_keys > > Please read it and tell me your thoughts. >
Nice, Andrea, thanks! Destructuring is quite handy. I wonder if there is opportunity to include array gathering. Something along the lines of: list ('foo' => $foo, ...$rest) = [ 'foo' => 1, 'bar' => 2, 'baz' => 3]; assert $foo === 1; assert $rest === [ 'bar' => 2, 'baz' => 3]; What do you think?