> On 08-Jun-2003 Philip Olson wrote:
> > [snip]
> >> <rant>
> >> 
> >> register_globals=off won't make good code any better --it's just 
> >> a safety net for the sloppy coders.
> > [snip]
> > 
> > In some sense, register_globals = off makes both bad and
> > good code better, because it means less pollution.   So
> > many unused variables get defined with register_globals
> > on and this means wasted memory/resources.  Pollution 
> > makes any environment worse!  Granted this isn't what you
> > meant, but still... ;)
> > 
> 
> Also true. 
> 
> On namespace pollution  --based on some of the replies I've seen on the
> list, there's a sizable number of neophyte (and too many veteran) coders
> that are starting scripts with:
> 
> <?php
> extract($_GET); extract($_POST); extract($_COOKIE);
> ...
> 
> And so far, I don't recall anybody mention that you need to
> unset($admin, $internal_var, $nukenewyork, ...) afterwards.
> 
> So nothing's really changed. 
> Bad code will mysteriously go tits-up (or worse) and good code will 
> keep on cranking.
> 
> No matter what register_globals= is set to.

Anyone that would suggest using extract() like that would
only do so to quickly make a register_globals dependent
script work (using .htaccess would be preferred there). I
doubt people actually do that for new code, well, at least 
anyone with half a brain.

Regards,
Philip


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to