Re: Constant Scope PHP5

From: Date: Sat, 23 Aug 2003 04:03:06 +0000
Subject: Re: Constant Scope PHP5
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-4140@lists.php.net to get a copy of this message
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" <zeev@zend.com> 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 >

« previous php.internals (#4140) next »