views:

9

answers:

1

Probably a trivial question, but in which order does Exception::getTrace return calls? Most recent first or last? I'd like to know before I implement my error handler.

BenTheDesigner

A: 

Why don't you test it yourself?

function NestedFunc() {
    throw new Exception("test");
}

function FunctionAbc() {
    NestedFunc();
}

try {
    FunctionAbc();
} catch (Exception $e) {
    var_dump($e->getTrace());
}
Crozin
Crozin, I would have if I was at my PC. Question posted while brainstorming on the train. Thanks
BenTheDesigner