php - Pass-by-reference for functions with varying length of functions -


I have a function with an optional number argument, something like this:

  function DoSomething () $ $ Args = funct_get_args (); // and the rest function}  

In the above given function, how can I define the first argument passed from the context?

So when I call it, I am able to do this:

DoSomething (and $ first, $ second, $ third);

Just declare it in the parameter list:

  Function DoSomething (and the first $) {$ args = func_get_args (); // and the rest function} DoSomething ($ first, $ second, $ third);  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

c# - Chart control: Design messed Up after clearing and re-adding Y-Values -

ruby on rails - Apipie interferes with proper error codes -