>I agree with Marcus: self is bound at runtime, so the behaviour is correct. If you do not like this late binding just do not use self but the name of the class.
Sorry to jump in the middle, but I've similiar question to constants defined in classes.
When the class is named SomeLongNameBecauseWedontHaveNamespaces and I define a SELF_EXPLAINING_CONSTANT_NUMBER_ONE I've to write SomeLongNameBecauseWedontHaveNamespaces::SELF_EXPLAINING_CONSTANT_NUMBER_ONE
to access it from within the class itself.
We're not going to change the language for that, sorry.
I didn't request any change ;) Just wanted to know if there's a current better practice. If not, then not.
thanks,
- Mar'k'us
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php