Re: Re: PHP 5.1 (Or How to break tousands of apps out there)
| From: | Jessie Hernandez | Date: | Mon, 28 Nov 2005 20:02:24 +0000 |
| Subject: | Re: Re: PHP 5.1 (Or How to break tousands of apps out there) | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20756@lists.php.net to get a copy of this message | ||
Hello Marcus,
"Marcus Boerger" <helly@php.net> wrote in message
news:1937793823.20051128205433@marcus-boerger.de...
> 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