Assume I have several classes like this:
class Child extends Parent {
public function foo() {
try {
ChildEngine::bar()
} catch (Exception\Custom $e) {
//exception handling
}
}
}
In some of these classes, bar() never throws the aforementioned exception in its ChildEngine, and in some bar() might throw it. On instantiating Child I want to see whether Exception\Custom is thrown in Child without invoking foo().
Does PHP have this kind of functionality?