php - How to pass an argument into call_user_func -


here line of code using:

$json[jsonconstant::json_custom] => call_user_func(array($this, $customtypes[$customdownloadtype])), 

$customtypes[$customdownloadtype] might resolve gettags().

what do though, if want pass argument gettags() though? example, have var called $time want pass in? do?

it seems want mixture of examples 2 , 4 http://php.net/manual/en/function.call-user-func.php - possible?

thanks

call_user_func($fn, 'a', 'b', 'c'); // => $fn('a', 'b', 'c');  call_user_func_array($fn, ['a', 'b', 'c']); /// => $fn('a', 'b', 'c'); 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -