Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4145 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97550 invoked by uid 1010); 23 Aug 2003 18:19:18 -0000 Received: (qmail 97521 invoked from network); 23 Aug 2003 18:19:17 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 23 Aug 2003 18:19:17 -0000 Received: (qmail 11284 invoked from network); 23 Aug 2003 18:19:13 -0000 Received: from localhost (HELO zeev-laptop.zend.com) (127.0.0.1) by localhost with SMTP; 23 Aug 2003 18:19:13 -0000 Reply-To: zeev@zend.com Message-ID: <5.1.0.14.2.20030823211843.0663ecf8@localhost> X-Sender: zeev@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 23 Aug 2003 21:19:55 +0300 To: "l0t3k" Cc: internals@lists.php.net In-Reply-To: <20030823174217.31249.qmail@pb1.pair.com> References: <001b01c368a1$775b2070$6402a8c0@sleepert> <5.1.0.14.2.20030823012845.0576f768@localhost> <5.1.0.14.2.20030823170950.05b14e30@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Constant Scope PHP5 From: zeev@zend.com (Zeev Suraski) 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. Zeev