Hello Marcus,

"Marcus Boerger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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
>

Same thing can be done like this:

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

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

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


Regards,

Jessie

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to