Re: [RFC] is_literal
| From: | Joe Watkins | Date: | Tue, 15 Jun 2021 07:19:01 +0000 |
| Subject: | Re: [RFC] is_literal | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-114877@lists.php.net to get a copy of this message | ||
Morning,
https://3v4l.org/nJhc1/rfc#focus=rfc.literals
It's not so much a bug as a side effect or quirk.
Note that, the result is correct, in the sense that you do have a literal
string - it is not marking an unsafe string as safe.
It's just that existing implementation details - RETURN_CHAR using interned
strings, and literal constant strings being interned by the compiler - lead
to a literal string being "re-used".
This is just a natural consequence of literal strings retaining their
literalness in the way we want them too, nothing dangerous is going on.
Cheers
Joe
On Tue, 15 Jun 2021 at 00:32, Claude Pache <claude.pache@gmail.com> wrote:
>
>
> Le 12 juin 2021 à 19:00, Craig Francis <craig@craigfrancis.co.uk> a
> écrit :
>
> Hi Internals,
>
> I'd like to start the discussion on the is_literal() RFC:
>
> https://wiki.php.net/rfc/is_literal
>
>
> Hi,
>
> I’ve found an interesting bug in the implementation:
>
> https://3v4l.org/JfSHX/rfc#rfc.literals
>
> —Claude
>
>
>