int func_num_args ();
The PHP construct
func_num_args gets the count for the number of arguments which were passed to the function. Remember that you can pass more arguments than are declared in the function’s parameter list.
It returns the count of the number of 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_num_args function in action. In this video, you will see how it works.
Your functions are bloated. Put them on a diet. Think "skinny" and "as few lines as possible."
In this video, you will go deeper into the instruction.
See It In Popular TechnologiesPro
Let’s look at
func_num_args in Laravel, Symfony, and WordPress. You will see how prevalent it is used.