On Tue, Jul 21, 2020 at 7:14 AM Michał Marcin Brzuchalski <
michal.brzuchal...@gmail.com> wrote:

> wt., 21 lip 2020 o 07:07 tyson andre <tysonandre...@hotmail.com>
> napisał(a):
>
> > > 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,
> >   ),
> > ))
> > ```
> >
>
> The RFC has been adjusted regarding the nullability of file and line
> properties and related getter methods.
>
> Is there anything else stopping it from getting up to the vote?
>
> Cheers,
> Michał
>

Why does StackFrame define both public typed properties *and* getter
methods? One or the other would make sense to me, but not both.

Nikita

Reply via email to