Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4140 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67240 invoked by uid 1010); 23 Aug 2003 04:02:32 -0000 Received: (qmail 67222 invoked by uid 1007); 23 Aug 2003 04:02:31 -0000 Message-ID: <20030823040231.67220.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: "DvDmanDT" References: <001b01c368a1$775b2070$6402a8c0@sleepert> <5.1.0.14.2.20030823012845.0576f768@localhost> Date: Sat, 23 Aug 2003 06:03:06 +0200 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Posted-By: 213.67.65.148 Subject: Re: [PHP-DEV] Constant Scope PHP5 From: dvdmandt@telia.com ("DvDmanDT") Wait a sec... When did const become a keyword? And since when can you initialize variables from outside a constructor/function? Sorry to bother.. -- // DvDmanDT MSN: dvdmandt@hotmail.com Mail: dvdmandt@telia.com "Zeev Suraski" skrev i meddelandet news:5.1.0.14.2.20030823012845.0576f768@localhost... > At 14:35 22/08/2003, Arjen Brouwer wrote: > >Should'nt this work? Currently it reports an error about a undefined constant. > > > > >class Test { > > const FOO = 100; > > var $bar = FOO; > > Should be var $bar = Test::FOO (or self::FOO, even though it appears not to > work right now) - there's no implicit class/object dereference of any kind > in PHP. > > Zeev >