PHP

func_get_arg, func_get_args , func_num_args in php

func_get_arg, func_get_args , func_num_args in php

func_get_arg, func_get_args functions are used to get a set of arguments which are passed to the functions. The arguments can be a integer, string, array or anything.

func_get_arg, func_get_args , func_num_args in php

Basically func_get_arg and func_get_args will collect the arguments in array.

func_get_arg

func_get_arg will return the single value of the set of arguments based on key values.

 

 func_get_args

func_get_args will return all the arguments in array format.



 func_num_args

func_num_args are used to count the number of arguments passing to the functions.

Thanks for reading this article. If you like this article, Please don’t forget to share and comment.

Thanks!.