Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33213 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51641 invoked by uid 1010); 17 Nov 2007 06:40:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51626 invoked from network); 17 Nov 2007 06:40:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2007 06:40:05 -0000 Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 205.234.132.11 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 205.234.132.11 scottsdale.servershost.net Received: from [205.234.132.11] ([205.234.132.11:34267] helo=scottsdale.servershost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/8F-51194-4CC8E374 for ; Sat, 17 Nov 2007 01:40:05 -0500 Received: from [216.15.51.211] (port=50181 helo=[192.168.1.90]) by scottsdale.servershost.net with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1ItHLZ-0002gl-IR; Sat, 17 Nov 2007 00:40:05 -0600 To: Robert Cummings Cc: Rasmus Lerdorf , internals@lists.php.net In-Reply-To: <1195281053.1702.8.camel@blobule> References: <8D.46.01128.768AD374@pb1.pair.com> <473E6F38.4020008@lerdorf.com> <1195274394.12249.34.camel@sams-room> <200711162354.34489.larry@garfieldtech.com> <1195279274.12249.40.camel@sams-room> <1195279545.12249.47.camel@sams-room> <473E87C5.4090200@lerdorf.com> <1195280474.12249.60.camel@sams-room> <1195281053.1702.8.camel@blobule> Content-Type: text/plain Date: Sat, 17 Nov 2007 01:40:06 -0500 Message-ID: <1195281606.12249.69.camel@sams-room> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scottsdale.servershost.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sambarrow.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] Re: Question about superglobals From: sam@sambarrow.com (Sam Barrow) I don't understand, people keep telling me this can cause problems so it's trash. Really? Functions and variables can cause problems too. Not to mention user input. Programming is not easy, but the more flexible it is the better. I think it's up to the programmer to keep track of his variables, rather than us limiting his functionality, just incase he makes a mistake. Any programmer can write bad code and it won't work. If he uses superglobals he should understand that he needs to document them, it's that simple. If that's too difficult, don't create a superglobal then, great. And if this isn't good enough, fine. Require an underscore for superglobals to differentiate them even more. I'll write the code myself, no problem. On Sat, 2007-11-17 at 01:30 -0500, Robert Cummings wrote: > On Sat, 2007-11-17 at 01:21 -0500, Sam Barrow wrote: > > True. What if we created a php.ini directive that defaulted to off that > > would determine the ability to declare superglobals, > > "allow_superglobals" or something. > > Does your code live in a bubble? Allowance of of arbitrary super global > definitions would open a can of local variable clobbering worms. > > A php.ini directive won't make this reality any more palatable. > > Cheers, > Rob. > -- > ........................................................... > SwarmBuy.com - http://www.swarmbuy.com > > Leveraging the buying power of the masses! > ........................................................... >