Re: [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects

From: Date: Mon, 20 Jul 2020 20:06:39 +0000
Subject: Re: [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-111080@lists.php.net to get a copy of this message
Hi Internals, Heads up, I plan to open the vote tomorrow morning. Cheers, Michał Marcin Brzuchalski wt., 7 lip 2020 o 22:46 Michał Marcin Brzuchalski < michal.brzuchalski@gmail.com> napisał(a): > Hi internals, > > following recently added alternative to token_get_all() in form > of a > dedicated class PhpToken > I've made a similar proposal for collecting stack traces by introducing > StackFrame::getTrace() > and StackFrame which replaces array with keys and values known > from > debug_backtrace(). > > To compete with easier adoption StackFrame implements > ArrayAccess > giving identical API > to debug_backtrace(). > > A test script with deep recursion up to 1M frames uses 50% less memory > than debug_backtrace(). > > The RFC is described here https://wiki.php.net/rfc/stack-frame-class ¥Ás2ã > *¯ØÚ > It includes implementation of PoC and tests. > > Cheers, > Michał Marcin Brzuchalski >

« previous php.internals (#111080) next »