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:
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
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
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
* 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
5 matches
Mail list logo