PHP has already supported argument unpacking (AKA spread operator) since 5.6. This RFC proposes to bring this feature to array expression.

An array pair prefixed by ... will be expanded in places during array definition. Only arrays and objects who implement Traversable can be expanded.

For example,

$parts = [ 'apple' , 'pear' ] ; $fruits = [ 'banana' , 'orange' , ... $parts , 'watermelon' ] ; // ['banana', 'orange', 'apple', 'pear', 'watermelon'];

It's possible to do the expansion multiple times, and unlike argument unpacking, ... can be used anywhere. It's possible to add normal elements before or after the spread operator.

Spread operator works for both array syntax( array() ) and short syntax( [] ).

It's also possible to unpack array returned by a function immediately.