I’m about to use func_get_args for reading additional arguments of a function call.
How does this affect the performance? Should I rather use an array for passing additional arguments instead of reading them with the function above?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unless you are using it in mass quantities, no single function will make that much difference. You could always check how long it takes to call by using
microtime()before and after the call, but I don’t think you’ll find anything interesting.Go ahead and use it if you’d like.
I’d be more worried about making sure other programmers understand how the function works and knowing that they can pass any number of arguments to the function.