Hello Dan,

Friday, October 10, 2003, 7:37:29 PM, you wrote:

> Hi Marcus-

> Marcus Börger wrote:

>>Constants are bound to the class rather then to the objects. Hence they
>>behave pretty much like static properties or default values of declared
>>properties and like the latter they are read only.
>>  
>>
> understood.

>>The only question here is whether we want to be able to access static
>>and/or const class members through something dynamically like $this at
>>runtime. Everything else is perfectly correct in place.
>>
>>And of course constants are public. So perhaps you might want to be able
>>to apply visibility to constants, too? If so i must dissappoint you with
>>the fact that it is currently impossible to do that and the amount of work
>>to enable this seems so high that it is unlike to happen.
>>
>>  
>>
> So, in order to access class constants from outside the class, the
> class itself must be static? Obviously (I thought for backwards
> compatability only) all classes are static in PHP5, but looking toward
> the future, will we continue to have all classes always statically
> accessible?

The class definition is a static thing but several things can only be
accessed from instantiated objects. That is a non static method and
non static properties can only be accessed via objects. What else should
happen? Non static members are instance bound not class bound.

-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

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

Reply via email to