We never resolved constants in compile time, because constants' values may be unknown in compile time.
Thanks. Dmitry. > -----Original Message----- > From: Pierre [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 22, 2007 5:12 PM > To: Dmitry Stogov > Cc: Johannes Schlьter; PHP Internals List > Subject: Re: [PHP-DEV] Constants in namesapces > > > On 8/22/07, Dmitry Stogov <[EMAIL PROTECTED]> wrote: > > You can have "const" outside namespaces but they are not real > > compile-time constants. They are set during execution in > the same way > > as define() does. > > > > <?php > > const DIR = dirname(__FILE__); > > echo DIR; > > ?> > > Off topic but this const makes me think about hidef (see > pecl/hidef). It would be nice if we can have them resolved at > compile time. At least when no instructions are involved in > the definition (numbers or single quote strings). > > Cheers, > --Pierre > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php