Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53280 invoked by uid 1010); 17 Nov 2007 06:47:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53264 invoked from network); 17 Nov 2007 06:47:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2007 06:47:56 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:40253] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/DF-51194-B9E8E374 for ; Sat, 17 Nov 2007 01:47:56 -0500 Received: from trainburn-lm-corp-yahoo-com.local (c-24-6-228-50.hsd1.ca.comcast.net [24.6.228.50]) (authenticated bits=0) by mail.lerdorf.com (8.14.2/8.14.2/Debian-1) with ESMTP id lAH6lq2R009275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 16 Nov 2007 22:47:52 -0800 Message-ID: <473E8E97.6060608@lerdorf.com> Date: Fri, 16 Nov 2007 22:47:51 -0800 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Sam Barrow CC: internals@lists.php.net 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> <1195281606.12249.69.camel@sams-room> In-Reply-To: <1195281606.12249.69.camel@sams-room> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/4822/Fri Nov 16 17:26:56 2007 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] Re: Question about superglobals From: rasmus@lerdorf.com (Rasmus Lerdorf) Sam Barrow wrote: > 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. We simply don't think this flexibility makes up for the potential confusion it can cause. It isn't solving something that can't be done, it is just changing a minor syntax and concept which has been in place for the past 12 years of PHP. To be completely blunt, this change has no chance of making it into PHP. If you want it, you will have to maintain your own patch. -Rasmus