PHP func_num_args() Function Last Updated : 28 Mar, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The func_num_args() function is an inbuilt function in PHP that returns the number of arguments in the user-defined function. Syntax: func_num_args(): intParameters: This function doesn't accept any parameter. Return Values: The number of arguments will be returned into the current user-defined function. Errors: It will generate errors if called from outside of the function. Example 1: This code demonstrates the func_num_args() function. PHP <?php function sum() { echo "Arguments in sum function = ", func_num_args(); } sum(1, 2, 3, 4); ?> Output: Arguments in sum function = 4 Example 2: The following code demonstrates the func_num_args() function. PHP <?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs \n"; $arg_list = func_get_args(); for ($i = 0; $i < $numargs; $i++) { echo "Argument $i is: " . $arg_list[$i] . "\n"; } } foo(1, 2, 3); ?> Output: Number of arguments: 3 Argument 0 is: 1 Argument 1 is: 2 Argument 2 is: 3 Reference: https://www.php.net/manual/en/function.func-num-args.php Comment More infoAdvertise with us Next Article PHP func_num_args() Function N neeraj3304 Follow Improve Article Tags : PHP PHP-file-handling PHP-function Similar Reads PHP func_get_args() Function The func_get_args() Â is an inbuilt function in PHP that is used to get a function argument list in an array form. This function is similar to func_get_arg(). Syntax: array func_get_args()Parameters: This function does not accept any parameter. Return Value: This method returns an array, where a copy 1 min read PHP func_get_arg() Function The func_get_arg() function is an inbuilt function in PHP which is used to get a mentioned value from the argument passed as the parameters. Syntax: mixed func_get_arg( int $arg ) Parameters: This function accepts a single parameter as mentioned above and described below. $arg: This parameter holds 2 min read PHP asin( ) Function Trigonometry is an important part of mathematics and PHPâs math functions provides us with some functions which are very useful for calculations involving trigonometry. One of such function is asin() function. The asin() function in PHP is used to find the arc sine of a number in radians. We already 2 min read PHP | call_user_func() Function The call_user_func() is an inbuilt function in PHP which is used to call the callback given by the first parameter and passes the remaining parameters as argument. It is used to call the user-defined functions. Syntax: mixed call_user_func ( $function_name[, mixed $value1[, mixed $... ]]) Here, mixe 2 min read PHP atan( ) Function Trigonometry is an important part of mathematics and PHPâs math functions provides us with some functions which are very useful for calculations involving trigonometry. One of such function is atan() function. The atan() function in PHP is used to find the arc tangent of an argument passed to it whi 2 min read Like