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.pa...@gmail.com> wrote:

>
>
> Le 12 juin 2021 à 19:00, Craig Francis <cr...@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
>
>
>

Reply via email to