Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33193 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4074 invoked by uid 1010); 17 Nov 2007 03:26:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4059 invoked from network); 17 Nov 2007 03:26:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2007 03:26:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=michaelm@swplumb.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=michaelm@swplumb.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain swplumb.com from 209.181.81.165 cause and error) X-PHP-List-Original-Sender: michaelm@swplumb.com X-Host-Fingerprint: 209.181.81.165 mail.swplumb.com Windows XP Pro SP1, 2000 SP3 Received: from [209.181.81.165] ([209.181.81.165:2813] helo=swplumb.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/08-51194-25F5E374 for ; Fri, 16 Nov 2007 22:26:12 -0500 Received: from michael-ms-computer.local [192.168.2.66] by swplumb.com with ESMTP (SMTPD-9.22) id AE6A02F0; Fri, 16 Nov 2007 20:22:18 -0700 Message-ID: <473E5F4F.2020508@swplumb.com> Date: Fri, 16 Nov 2007 20:26:07 -0700 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Sean Coates CC: Sam Barrow , internals@lists.php.net 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> <1195259494.10547.2.camel@sams-room> <0E6C7DB2-4126-4660-A813-E21C03045247@caedmon.net> In-Reply-To: <0E6C7DB2-4126-4660-A813-E21C03045247@caedmon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Question about superglobals From: michaelm@swplumb.com (Michael McGlothlin) So the idea now is to inappropriately force everything to be a class? >> Yes, and in even larger scale applications it can become even more >> useful. I have a web framework I'm working on, it's about 9,500 lines of >> code now with hundreds of functions/classes. Every function/method has >> to specify global for my 3 universal variables which contain large >> arrays of configuration information. With this, I can say "superglobal >> $mod, $sec, $cfg" in my root include file, and not worry about it again. > > class Config { > const FOO = "Bar"; > } > > function oink() { > if (Config::FOO == 'Bar') { > echo "OINK"; > } > } > > etc. > IMO, you really don't need more superglobals. > > S -- Michael McGlothlin Southwest Plumbing Supply