I am trying to understand how to use class hierarchies in PHP. In Java programming i would be able to do something like this:
public class ClassOne extends SuperClass{
}
public class ClassTwo extends SuperClass{
}
public class SuperClass{
}
Now when i instantiate an object as unknownclass = new SuperClass();
I would then be able to cast this unknownclass
to any of the classes it extends on the go.
My question is how does this apply to PHP ? and how do you take it in use?