Is it possible to reflect upon a chain of method calls to determine at what point you are in the chain of calls? At the very least, is it possible to discern whether a method is the last call in the chain?
$instance->method1()->method2()->method3()->method4()
Is it possible to do the same using properties that return instances of objects?
$instances->property1->property2->property3->property4