Re: Constants in namesapces

From: Date: Thu, 23 Aug 2007 20:17:13 +0000
Subject: Re: Constants in namesapces
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-31872@lists.php.net to get a copy of this message
On 23.08.2007 23:56, Stanislav Malyshev wrote:
define(__NAMESPACE__.'::FOOBAR', $value) will work out of the box.
Yep, works, but looks not so nice either. I have an idea: add an operator which prepends __NAMESPACE__.'::'.
Special FUNCTION to do "__NAMESPACE__.'::'?! Sheesh..
I.e. say we name if ns_fullname (I know, this name sucks, get me better one :), so you'd say: define(ns_fullname('FOOBAR'), $value) IMHO it looks better. Maybe we can even think about some character to do this operator :)
-- Wbr, Antony Dovgal

« previous php.internals (#31872) next »