Ellipsis With Array Parameters

../_images/ellipsis_array_parameters.png

It is possible to spread parameters from an array, when calling a function.

With string keys, the parameters are named and assigned their corresponding parameter.

With integer positions, the parameters are used depending of their position in the array, not their actual key.

It might require a call to ksort() or array_values() to make it clear.

See Also

PHP Features