Files
developer-roadmap/roadmaps/php/content/variadic-functions@rtmytETfyyLdcXUC0QyzL.md

470 B

Variadic Functions

Variadic functions accept a variable number of arguments using the ... spread operator in the parameter list, like function sum(...$numbers). All extra arguments are collected into an array. The spread operator can also be used in function calls to unpack an array into arguments.

Visit the following resources to learn more: