Re: Re: [RFC] is_literal

From: Date: Wed, 16 Jun 2021 21:29:36 +0000
Subject: Re: Re: [RFC] is_literal
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-114913@lists.php.net to get a copy of this message
On Wed, 16 Jun 2021 at 10:19 pm, Bruce Weirdan <weirdan@gmail.com> wrote:

> On Thu, Jun 17, 2021 at 12:01 AM Craig Francis <craig@craigfrancis.co.uk>
> wrote:
> > is_literal can be used for strings because we can flag what’s
> > user and what’s developer defined, and with Matthew’s request, it could
> do
> > integers (because an integer value alone is not inherently risky, and
> it’s
> > already used a lot).
>
> To clarify, do you imply that *all* integers are safe? Or would they
> also be differentiated into literal and non-literal varieties?



This would be all integers, to support the request from Matthew.

I also believe, after a quick check with Joe, that it’s not possible to add
a flag to an integer (“non reference counted types are stack allocated, ie
the zval on either side of a call boundary are unique”). So it couldn’t
work the same way.

Craig


Thread (69 messages)

« previous php.internals (#114913) next »