> Le 5 avr. 2019 à 09:45, Stijn Peeters <i...@stijnpeeters.nl> a écrit :
> 
> 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 
> 
> 

That begs the question: why is this invalid for function calls?

In fact, I am able to easily hack around the limitation:

    $result = someFunction(...$arr1, ...$arr2, ...[111]); // valid

but the limitation seems just an unnecessary annoyance.

—Claude

Reply via email to