Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4154 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89450 invoked by uid 1010); 23 Aug 2003 22:10:04 -0000 Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89342 invoked from network); 23 Aug 2003 22:10:01 -0000 Received: from unknown (HELO bagend.shire) (67.126.220.228) by pb1.pair.com with SMTP; 23 Aug 2003 22:10:01 -0000 Received: (qmail 67671 invoked by uid 1000); 23 Aug 2003 22:14:02 -0000 Date: Sat, 23 Aug 2003 22:14:02 +0000 To: internals@lists.php.net Message-ID: <20030823221402.GG56835@bagend.shire> Mail-Followup-To: internals@lists.php.net References: <001b01c368a1$775b2070$6402a8c0@sleepert> <5.1.0.14.2.20030823012845.0576f768@localhost> <5.1.0.14.2.20030823170950.05b14e30@localhost> <5.1.0.14.2.20030823211843.0663ecf8@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20030823211843.0663ecf8@localhost> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] Constant Scope PHP5 From: php-dev@zirzow.dyndns.org (Curt Zirzow) * Thus wrote Zeev Suraski (zeev@zend.com): > At 20:40 23/08/2003, l0t3k wrote: > >Zeev, > > speaking of const, i have a feature request. why not accept "const" in > >the global context and create a compile-time global constant ? > >e.g. > > > > const FOO = 1 ; > > const BAR = 2; > > > > class Barbara { > > const Barbara::BUSH = FOO; > > }; > > > >i'd much prefer this as an alternative to the runtime define(). > > It's going to be runtime either way, because you could do if (...) { const > FOO = 1; } else {const FOO = 2 }. Not sure if we want it as syntactic > sugar for define() or not. This would be nice! Id like to add perhaps, but not sure how hard it would be, to make this constant (aliased define) unchangeable through out the life time of the script. Curt -- "I used to think I was indecisive, but now I'm not so sure."