Re: Constants in namesapces

From: Date: Wed, 22 Aug 2007 13:12:04 +0000
Subject: Re: Constants in namesapces
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-31837@lists.php.net to get a copy of this message
On 8/22/07, Dmitry Stogov <dmitry@zend.com> 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

« previous php.internals (#31837) next »