array func_get_args ();
The PHP construct
func_get_args gets the all of the arguments that were passed to the function. Passed arguments are available to the function, even when they are not declared in the function’s parameter list.
Returns an array of all of the arguments that were passed to the function. The elements within the array are in order starting at index of zero to the order of the arguments passed to the function.
Errors and Exceptions
You will get a warning if you use this construct outside of a function.
Show It in ActionBasic
Let’s see the
func_get_args function in action. In this video, you will see how it works.
You get WET when you swim. Stay DRY when you code.
In this video, you will go deeper into the instruction.
See It In Popular TechnologiesPro
Let’s look at
func_get_args in Laravel, Symfony, and WordPress. You will see how prevalent it is used.