On Thu, Dec 9, 2010 at 2:31 AM, James Butler
<james.but...@edigitalresearch.com> wrote:

> Sorry, I wasn't being very clear there, what I really meant to say was will 
> there be the will to remove it considering the effects.
> I suppose INI is enough to allow it to be easily changed, but would it ever 
> become a default setting of off, rather than something that can be optionally 
> off?

If you are aware of what to change in your configuration, why can't
you make the change?

Those of us having to support code we do not control, the numerous
widely used open source projects and billions of lines of code would
have bc issues if a change like this was to be changed to default =
off, and only on if people have ini access.

Not to mention, I have had issues (and I can't reproduce it properly
or I would report it) where sometimes i will have a variable in global
scope in one file, and I have to reference it as $GLOBALS['variable']
in another include, or I have to global $variable; in the include to
be able to get to it, and I'm not quite sure why.

I also like being able to grab a single variable out of global scope
(or single array item) without global $array; and then only using
$array['foo'], I can just shorthand it to $GLOBALS['array']['foo']
inside of function scope.

Globals are bad practice, but I use one or two global arrays to track
state / configuration throughout the application, very minimal, and
sure, I could figure out creative ways to never expose anything in
global scope, but why bother? While I am not as low-level in opcode
knowledge, isn't global constant definition almost as expensive (+/-
maybe a few opcodes?)

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to