Page 1 of 1

Accessing subclass methods/members

Posted: Wed Oct 31, 2007 2:07 am
by alex.barylski
In PHP 4 and 5 is this absolutely done via the Paamayim nekudotayim or scope resolution operator?

As I understand it (although I haven't tested) you can access base class members using either:

Code: Select all

ClassName::_someMethod
OR

Code: Select all

parent::_someMethod
Of which the latter is prefered, I know. ;)

I just need to make sure that using the :: operator is the ONLY way to directly access base class members???

p.s-practically anyways, using unusual hacks doesn't count. :)

Cheers :)

Posted: Wed Oct 31, 2007 10:33 am
by feyd
As usual, you need to try it.