Date: 12/07/00
- Next message: sterling <email protected>: "[PHP-DEV] PHP 4.0 Bug #8150 Updated: extending call_user_func()'s functionality"
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #6464 Updated: Compilation w/ curl support fails with _gd_parse error (?)"
- In reply to: sbergmann <email protected>: "[PHP-DEV] PHP 4.0 Bug #8150: extending call_user_func()'s functionality"
- Next in thread: Andrei Zmievski: "Re: [PHP-DEV] PHP 4.0 Bug #8150: extending call_user_func()'sfunctionality"
- Reply: Andrei Zmievski: "Re: [PHP-DEV] PHP 4.0 Bug #8150: extending call_user_func()'sfunctionality"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
sbergmann <email protected> wrote:
> Imagine the following situation:
>
> function foo()
> {
> // get arguments for call of foo()
> $arg_list = func_get_args();
>
> // call another function, depending on $arg_list
> // and passing parts of $arg_list as parameters
> call_user_func( "bar", /* how can i put here a
> variable number of
> arguments? */
> );
> }
Forgot to tell: The easiest way to implement this would be a
call_user_func_array( $func_name, $func_args[] )
function, that calls the function $func_name and gives $func_args[0] as
first argument, and so on.
-- <? print implode( "", array_reverse( preg_split( "//", "dlrow laer " . "eht ot emoclew" ) ) ); /* visit http://www.sebastian-bergmann.de/ */ ?>-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sterling <email protected>: "[PHP-DEV] PHP 4.0 Bug #8150 Updated: extending call_user_func()'s functionality"
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #6464 Updated: Compilation w/ curl support fails with _gd_parse error (?)"
- In reply to: sbergmann <email protected>: "[PHP-DEV] PHP 4.0 Bug #8150: extending call_user_func()'s functionality"
- Next in thread: Andrei Zmievski: "Re: [PHP-DEV] PHP 4.0 Bug #8150: extending call_user_func()'sfunctionality"
- Reply: Andrei Zmievski: "Re: [PHP-DEV] PHP 4.0 Bug #8150: extending call_user_func()'sfunctionality"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

