** {Code...} func_get_args () to obtain all the actual passing parameters of the current function. the returned value is of the array type. how can I find the source code of func_get_args? I want to see how this behavior is implemented. /**
* Calculate any number of sums and return the calculated result */function sum () {// no parameter $ total = 0 is defined in parentheses; // use func_get_args () to obtain all the actual passing parameters of the current function. the returned value is array type $ varArray = func_get_args (); foreach ($ varArray as $ var) {$ total + = $ var;} return $ total;}/***** The following is a call example *****/echo sum (1, 3, 5 ); // calculate 1 + 3 + 5 echo sum (1, 2); // calculate 1 + 2 echo sum (1, 2, 3, 4 ); // calculate 1 + 2 + 3 + 4
Func_get_args () to obtain all the actual passing parameters of the current function. the returned value is of the array type.
How can I find the source code of func_get_args? I want to see how this behavior is implemented.
Reply content:
/**
* Calculate any number of sums and return the calculated result */function sum () {// no parameter $ total = 0 is defined in parentheses; // use func_get_args () to obtain all the actual passing parameters of the current function. the returned value is array type $ varArray = func_get_args (); foreach ($ varArray as $ var) {$ total + = $ var;} return $ total;}/***** The following is a call example *****/echo sum (1, 3, 5 ); // calculate 1 + 3 + 5 echo sum (1, 2); // calculate 1 + 2 echo sum (1, 2, 3, 4 ); // calculate 1 + 2 + 3 + 4
Func_get_args () to obtain all the actual passing parameters of the current function. the returned value is of the array type.
How can I find the source code of func_get_args? I want to see how this behavior is implemented.
Built-in functions in the source code has https://github.com/php/php-sr...