Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33186 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70250 invoked by uid 1010); 17 Nov 2007 00:38:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 70235 invoked from network); 17 Nov 2007 00:38:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2007 00:38:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; 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:34967] helo=scottsdale.servershost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/C2-51194-7083E374 for ; Fri, 16 Nov 2007 19:38:31 -0500 Received: from [216.15.51.211] (port=50269 helo=[192.168.1.90]) by scottsdale.servershost.net with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1ItBhe-0005A1-LH; Fri, 16 Nov 2007 18:38:30 -0600 To: Stanislav Malyshev Cc: Michael McGlothlin , internals@lists.php.net In-Reply-To: <473E35A3.3010307@zend.com> References: <8D.46.01128.768AD374@pb1.pair.com> <1195246391.21084.15.camel@sbarrow-desktop> <1195250285.4012.6.camel@johannes.nop> <1195251014.21084.20.camel@sbarrow-desktop> <473E349E.3050704@swplumb.com> <473E35A3.3010307@zend.com> Content-Type: text/plain Date: Fri, 16 Nov 2007 19:38:31 -0500 Message-ID: <1195259911.10547.9.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) Well this is very common with PHP, it's very flexible and it's easy for a bad programmer to create chaotic code and get away with it, but this can happen with many features of PHP. For serious developers however, this could prove to be very useful when used appropriately. People will do what they will and make sloppy programs, but that's completely up to them. No point in holding stuff back from people who could benefit from it just to protect inexperienced them from their own sloppiness. You know what I mean? On Fri, 2007-11-16 at 16:28 -0800, Stanislav Malyshev wrote: > > I think the superglobal keyword is a great idea. I have a custom class > > that implements a custom interface to memcache with a MySQL backend for > > data that drops out of memcache or is to big to be stored easily in > > memcache. I get annoyed at needing to include a global statement in > > every place I want to use memcache. > > I don't think it's a good idea. Superglobals are special for a reason - > if everybody would just add stuff into global space and make it > superglobal because they can't type a couple of keystrokes, it would be > a mess. Just declare a class and use statics or singletons.