Passionate PHP Developer focused on microservices and PHP internals.
It's an alternative to debug_backtrace()
with stack-trace frames as objects using less memory than arrays.
Introduced class include two static methods which allows collecting frames from stacktrace:
StackFrame::getTrace(?int $limit = null, ?int $offset = null): array
- collects all or portion of stacktraceStackFrame::getFrame(int $index): StackFrame
- retrieves a single frame from the stacktrace