PHP is it possible to convert array to vars and pass them somewhere -


In short, what I want is a type of export () function (but not exported), it creates a new variable Returns the number of symbols in the symbol table and the number of wars created.

I am trying to figure out what the function is possible to declare

  function foo ($ bar, $ falcon) {var_dump (func_get_args ()); }  

and then pass an array so that each value represents the array.

Just wondering if this is possible (it does not seem like that).

I need dynamic loading for this, so the number of arguments, the size of the array can be different - please do not offer to pass it

  foo ($ Arrival ['bar']);  

and so on.

Then, the ideal point of view will look like

  foo (array ('foo' => 1 ',' bar '= & gt;' 2 ' ..., 'zzz' => 64));  

  function fu ($ foo, $ bar, ..., $ zzz) {}  
for declaration

As far as I remember that some dynamic language lists can be remembered (or maybe I am wrong).

(I want to create dynamically parametric methods in the classroom and want to create the underlying mechanisms of control functions, logic number, default value, and so on it is quite good, so I have array parameters and func_get_args and func_get_num Could get rid of the method in the system).

Thanks in advance.

you

P> example:

/ Strong>

  function fu ($ bar, $ baz) {return call_user_func_array ('beepboop', func_get_args ()); } Function beepbop ($ bar, $ falcon) {print ($ bar. '' .baz); } Foo ('this', 'works'); // Output: This works  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -