NYCPHP Meetup

NYPHP.org

[nycphp-talk] static methods in derived classes

David Sklar sklar at sklar.com
Thu Sep 23 10:28:24 EDT 2004


Joseph Crawford wrote:
> yes i dont believe you can do it like that (although i may be wrong) i
> think static methods need to be accessd by parent::eat();
> 
> i know that when you have a static method in one class in the same
> class you cannot use $this->eat() you must use Self::eat() so try
> parent:: and let me know how things go.
> 

parent:: lets you access a parent method from a child class. I am 
interested in accessing a child method from a parent class. There is no 
child:: keyword to do that. This may just be a limitation in how self:: 
works.

David




More information about the talk mailing list