Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33188 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79087 invoked by uid 1010); 17 Nov 2007 01:37:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 79071 invoked from network); 17 Nov 2007 01:37:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2007 01:37:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=sean@caedmon.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sean@caedmon.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain caedmon.net from 64.15.79.181 cause and error) X-PHP-List-Original-Sender: sean@caedmon.net X-Host-Fingerprint: 64.15.79.181 iconoclast.caedmon.net Linux 2.5 (sometimes 2.4) (4) Received: from [64.15.79.181] ([64.15.79.181:60467] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/F3-51194-EB54E374 for ; Fri, 16 Nov 2007 20:37:02 -0500 Received: from localhost (localhost [127.0.0.1]) by iconoclast.caedmon.net (Postfix) with ESMTP id A13DBE8005; Fri, 16 Nov 2007 20:36:53 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at iconoclast.caedmon.net Received: from iconoclast.caedmon.net ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x200SPIcJHSb; Fri, 16 Nov 2007 20:36:46 -0500 (EST) Received: from [10.8.0.2] (sarcasm.vpn [10.8.0.2]) by iconoclast.caedmon.net (Postfix) with ESMTP id 9E48AE8004; Fri, 16 Nov 2007 20:36:45 -0500 (EST) Cc: Michael McGlothlin , internals@lists.php.net Message-ID: <0E6C7DB2-4126-4660-A813-E21C03045247@caedmon.net> To: Sam Barrow In-Reply-To: <1195259494.10547.2.camel@sams-room> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Fri, 16 Nov 2007 20:36:50 -0500 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> X-Mailer: Apple Mail (2.915) Subject: Re: [PHP-DEV] Re: Question about superglobals From: sean@caedmon.net (Sean Coates) > 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