Hi,

If I understand correctly it is possible in this proposal to use normal 
arguments after using an unpackable argument:

        $arr4 = array(...$arr1, ...$arr2, 111); //valid

This is something that is not possible when using argument unpacking in 
function calls:

        $result = someFunction(...$arr1, ...$arr2, 111); //invalid

While I personally like the more permissive variety in this RFC, I think this 
could be a confusing inconsistency, and for clarity's sake it would be better 
to keep both instances of the unpacking syntax as consistent with each other as 
possible.

Best,
Stijn 




Op 4 april 2019 bij 16:15:16, CHU Zhaowei 
(m...@jhdxr.com(mailto:m...@jhdxr.com)) schreef:

> Hi internals,
>  
> Thanks for the people who joined the discussion of my [RFC: Spread Operator 
> in Array Expression](https://wiki.php.net/rfc/spread_operator_for_array). The 
> biggest change is I have dropped the support for string keys in v0.2 as 
> suggested by Côme, to make the behavior of spread operator consistent. I have 
> also added Q&A to explain the questions I received.
>  
> Thanks & best regards,
> CHU Zhaowei
>  
>  
>  
>  
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>  

Reply via email to