Re: Windows development
| From: | Dave Walton | Date: | Wed, 13 Jan 1999 05:42:08 +0000 |
| Subject: | Re: Windows development | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-3505@lists.php.net to get a copy of this message | ||
On 10 Jan 99, at 1:13, Rasmus Lerdorf wrote:
> Dave Walton posted a followup at:
>
>
> http://www.progressive-comp.com/Lists/?l=php-dev&m=91576175323046&w=2
>
> where he says he thinks it is a bad idea to import variables directly
> into the symbol table under all circumstances. I don't really agree with
> this though. PHP has always imported all sorts of crud into its symbol
> table by default. As long as there is a way to turn off the behaviour, I
> don't see the problem, and it certainly is more convenient for users which
> is the idea.
For the record, I'm not alone in that feeling. See Kristian's
comments about another function that had the same behavior:
http://www.progressive-comp.com/Lists/?l=php-
dev&m=90592936718966&w=2
In short, it is unnecessary for functions to create or modify arbitrary
global variables, and that behavior can cause unexpected side-
effects. The only other place I can think of where PHP imports
stuff into its symbol table is the GPC stuff. Since that happens
before execution rather than in the middle of a script, it's much less
likely to cause problems.
Are there any other functions in PHP that create new global
variables when the function is called? I don't remember seeing
any, but I've barely scratched the surface of what PHP can do.
Dave
----------------------------------------------------------------------
Dave Walton
Webmaster, Postmaster Nordic Entertainment Worldwide
walton@nordicdms.com http://www.nordicdms.com
----------------------------------------------------------------------
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net