Re: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Aric Caley
Marek Kilimajer wrote: But workaround would be to call your function with array(): Thanks, I was afraid that might be the only way. I guess its possible if you write an extension (like mysqli) in C? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Tom Rogers
Hi, Friday, April 30, 2004, 1:40:26 AM, you wrote: AC I want to create a function similar to the MySqli extensions' AC mysqli_stmt_bind_param() function. I assume that this function takes AC its arguments passed by reference. Now, I know how to do variable AC length argument lists in a

Re: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Jason Barnett
A bit like this $num_args = func_num_args(); $arg_list = func_get_args(); $vars = 'function_to_call('; for ($i = 0; $i $num_args; $i++) { $vars .= ($i 0)? ',':''; $varname = 'variable'.$i; $$varname = $arg_list[$i]; $vars .= \$$varname; } $vars .= ');'; //that leaves you with a string

Re[2]: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Tom Rogers
Hi, Friday, April 30, 2004, 3:51:19 AM, you wrote: JB I know I'm probably paranoid, but eval() always bugs me. I think for JB what you want to do you can use call_user_func_array() JB $args = func_get_args(); JB call_user_func_array('function_to_call', $args); JB

Re: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Curt Zirzow
* Thus wrote Tom Rogers ([EMAIL PROTECTED]): Hi, Friday, April 30, 2004, 3:51:19 AM, you wrote: JB I know I'm probably paranoid, but eval() always bugs me. I think for JB what you want to do you can use call_user_func_array() JB $args = func_get_args(); JB