I want to have a static method in a parent class that creates instances of whatever subclass i call this method on.
An example to make this more clear:
cl
As of php 5.3 you can use the static keyword for this
prints
object(A)#1 (0) { } object(B)#2 (0) { } object(C)#1 (0) { }
edit: another (similar) example
t=A A::__construct type of o=A t=B B::__construct type of o=B t=C C::__construct type of o=C