# Possible addition: scoped class constants

- Thread: https://externals.io/message/42107
- Original archive: https://news-web.php.net/php.internals/42107
- Started by Robin Burchell on 2008-12-04T22:19:11+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #42107 — Robin Burchell — 2008-12-04T22:19:11+00:00

URL: https://externals.io/message/42107#42107

Hi,

First up, I'd like to apologise in advance if I'm mailing the wrong
place. I have done my homework before subscribing, and this looks to
be the right one, but - one never can tell...

Formalities out of the way, I've been a long-time PHP developer and
I'm sort of considering dipping my feet into things - one thing in
particular that bothers me that I'd like to consider looking at is the
inability to scope class constants, i.e:

class Foo
{
   protected BAR = 5;
}

is not possible. This is perhaps not all that major, but considering
that scoping for variables and methods is supported and respected, it
seems like a rather strange omission.

Is this perhaps something that would be looked on positively? If so, I
might start trying to look into it in my spare time. (note: advice on
where to look, what not to do, etc are all very much welcome).

Thanks!
Robin Burchell
