RE: [PHP-DEV] Constants in namesapces

From: Date: Thu, 23 Aug 2007 09:46:43 +0000
Subject: RE: [PHP-DEV] Constants in namesapces
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-31864@lists.php.net to get a copy of this message
I think we must cut the patch to use only "compile-time" constants in namespaces. For runtime constants we can use existing define(). This will fix inconsistency. We also can extend define() with additional argument that will allow to create namespace constant. function define(string $var, mixed $val, bool namespace_constant = false); Thanks. Dmitry. > -----Original Message----- > From: Stanislav Malyshev [mailto:stas@zend.com] > Sent: Wednesday, August 22, 2007 10:43 PM > To: Antony Dovgal > Cc: Dmitry Stogov; 'PHP Internals List' > Subject: Re: [PHP-DEV] Constants in namesapces > > > > I propose to define these constants in compile time or change class > > constants to be defined in runtime. > > The latter would be hard to do since class definition is a runtime > thing. Unless we make all classes be defined in runtime (and accept > slowdown following from it) we don't have any point in time > where class > constants could be defined. Also, we don't have a good way to > keep the > expression and scope necessary for evaluating it. > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com >

« previous php.internals (#31864) next »