At 01:07 30/07/2001, Marc Boeren wrote:
>Hi,
>
> > force a prefix onto the variable name. I.e.,
> > import_globals("GPC", "form_");
>
>I like this idea (the whole idea of import_globals is good, I think, but I'd
>rather call it accept_globals, but more on that later :), only this would
>make it difficult to actually differentiate between get, post and cookie,
>needing import_globals("G", "get_"); import_globals("P", "post_"); and
>import_globals("C", "cookie_"); if that was needed.
>
>I would like to see it implemented something like
>
>accept_globals("GPC", 'user', 'password', 'value_*', 'more');
>
>where you can specify both complete names and wildcards, even though I'd
>like a better range-check for the wildcard, perhaps something like
>value_[0..12].
I think that this is a clear example of "the enemy of good is the even
better" (I'm not sure how well this translates to English :). We need to
keep this function simple, and that way, it clearly isn't. If you want
three different scopes, use 3 calls. If you want register_globals-like
behavior only prefixed, use import_globals("GPC", "form_"). KISS should be
our guiding light here.
Zeev
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]