Just as easy....

namespace Foo
{
   class Foo {
     const XYZ = 42;
   }

   class Bar
   {
     const XXXX = Foo::XYZ;
     //...
   }

   class Baz
   {
     const XXXX = Foo::XYZ;
     //...
   }
}

-----Original Message-----
From: Marcus Boerger [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 28, 2005 11:55 AM
To: Stanislav Malyshev
Cc: 'PHP internals'
Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out
there)

Hello Stanislav,

  easy changing of behavior in classes of a namespace by only changing one
value for instance.

namespace Foo
{
   const XYZ = 42;

   class Bar
   {
     const XXXX = Foo::XYZ;
     //...
   }

   class Baz
   {
     const XXXX = Foo::XYZ;
     //...
   }
}

marcus

Monday, November 28, 2005, 8:49:10 PM, you wrote:

MB>>>brains sooner or later. On the other hand \ has a clear visible split
MB>>>meaning. That is all the namespace operator must have besides not

> Yes, except that it is used as escape character in a dozen of languages or

> more and automatically recognized as such by any experienced programmer, 
> who would instantly think "WTF is \n doing inside an identifier???"

MB>>>Btw, during paris meeting we thought that: "Constants in name spaces 
MB>>>are allowed unless we find problems with the implementation".

> I don't see any reason why they should be needed. What you can do with 
> them that you can't do with class constants?




Best regards,
 Marcus

-- 
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

Reply via email to