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 -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -