Re: cvs: php4 /ext/standard basic_functions.c formatted_print.c php_string.h

From: Date: Tue, 07 Aug 2001 19:55:37 +0000
Subject: Re: cvs: php4 /ext/standard basic_functions.c formatted_print.c php_string.h
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-62490@lists.php.net to get a copy of this message
At 02:53 PM 8/7/2001 -0500, Andrei Zmievski wrote:
On Tue, 07 Aug 2001, Andi Gutmans wrote: In what case is this useful? I'm kind of worried that so many functions are popping up in PHP which accept arrays as parameters. It's much slower than passing the arguments in a regular way. How often do people dynamically build formats *and* then dynamically build an array of arguments? Here's request from Colin: "What are the chances of getting printf() and sprintf() to have an optional syntax:
    string  sprintf( string format, array args );
Where $args would be an array of all the arguments to be passed, instead of listing them one by one. This would be useful if one needed to write some kind of a wrapper function for printf() that processed the format string and/or each of the arguments before passing them to printf()."
Do you really think it's worth it? People will use features which are available. I don't think it's the right thing to allow them to write code which is *much* slower than the old way when it usually doesn't give you much advantage over the old way. Anyway, if you guys think it's really needed, so be it. I just think it's kind of slow and I personally think we should not encourage people to pass arguments with arrays. We're doing this in far too many places for my taste. Andi

« previous php.dev (#62490) next »