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

From: Date: Tue, 21 Jul 2020 05:07:39 +0000
Subject: Re: Re: [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-111086@lists.php.net to get a copy of this message
> Can you give an example of an internal stack frame?  A stack frame that was created by a PHP internal function instead of by userland code, i.e. one without a file in the frame. Related to https://github.com/php/php-src/pull/5820#pullrequestreview-452080212 ``` php > array_map(fn() => $GLOBALS['x'] = StackFrame::getTrace()[0], [2]); php > var_export($x); StackFrame::__set_state(array( 'file' => NULL, 'line' => NULL, 'function' => '{closure}', 'class' => NULL, 'type' => NULL, 'object' => NULL, 'object_class' => NULL, 'closure' => NULL, 'args' => array ( 0 => 2, ), )) ``` Regards, - Tyson

« previous php.internals (#111086) next »