On 3 November 2014 22:45:11 GMT, Chris Wright <daveran...@php.net> wrote:
>Good evening list,
>
>I'd like to open discussion a relatively simple and clear-cut RFC,
>either
>people will like it or they won't, there isn't a lot more to say here
>than
>what's in the RFC so please have a read.
>
>https://wiki.php.net/rfc/additional-splat-usage

I like the concept with list-style arrays, but find the behaviour with regards 
associative arrays quite confusing. There's already a difference in behaviour 
between array_merge and + in this regard, and having a third way of writing the 
same thing isn't great - it would apparently be legal to write $foobar = 
[...$foo, ...$bar]; to simply merge two existing arrays.

If anything, I think I would expect the keys of splatted arrays to be 
discarded, since it seems most natural to use this in a list context, but I can 
imagine always having to check in the manual.

-- 
Rowan Collins
[IMSoP]


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to