Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114877 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40241 invoked from network); 15 Jun 2021 07:02:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Jun 2021 07:02:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A64481804C9 for ; Tue, 15 Jun 2021 00:19:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_SBL, URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 15 Jun 2021 00:19:14 -0700 (PDT) Received: by mail-oi1-f173.google.com with SMTP id t140so17216284oih.0 for ; Tue, 15 Jun 2021 00:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5K0lFr62KMW1b+Kqzjxz5vCSX6QaH5i5URKrTv42g9k=; b=V72MT4+jUQcCtGgbMYLyAaxhKsVjv1WAnJy9/DlNzjQCP7DXxxZK6Qhk9sBv3AgCqZ 3Y7tf5B8xbtnMhfrWiT0ix8v5ie4HsHWKFd8pgfsG1B7KX6K+VeFnRWAQmn8Skh/Fz1e jZkv3+qtCaVfRuJxhIvRmorIS1iJOXgaozV+5k28beW7oKC5NimEdvWWIhThegXD2tfc imphnipx4BmdiOE0jVESlRGt3CkvR3xuBzCIjDiuzufzC1LZNuOOJD9/L75l94LClNxa POxgmUlFhyyxml25wjwvYNR6D9FYZgN38PduKd7pLYq7Fk6TqY656y5dnLEv6k+IQ9hK H2eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5K0lFr62KMW1b+Kqzjxz5vCSX6QaH5i5URKrTv42g9k=; b=TS0EV/a6XR01BtTstN+fhbl6XQuCTQKfKpDFFWfpoC/YTYMrwE5mR6rnRjXd4BdrBF PEhhxS+gqsqluvKeoYleJDnAA9Lp8o/BfU4rQEFfTycroelYlvzhku8aOnipUjtbRqyd R+RQCAW/Ubj6ZSXEb2DpnnXvXm6ElbCg+oIf2L0R4IrqNhnJ5zi6AYnx/oRp3Cc+yhVw YlYc8zlvFxEMVwTykOJsDNitt3MB5A4v7DNLou8XGifwr1Va01oqZpXehVG205Er6obU DIm/66HGSfiUPc/x9qKaypxF9gxOIZZ0r0hNym4IFYidcmhsPx9wSZWLkxEQl7TIAFRq 9i3g== X-Gm-Message-State: AOAM533FnzMvcapZD9iRwDCWBKMp5C/nM0d0xhw3PaaB/eaRI9gcfnjD CwzX0xr3bI5Yx3hsQvv4aNB61jbOGSAbPKedjOM= X-Google-Smtp-Source: ABdhPJz9myiV8bgqGMFZsa0Ckg2M8rpLNlfpiOsE1Ljsz15rs1Tf8tNlxg2ATUUT8o1hbKM6A2IroI4aDtJYWA02mTI= X-Received: by 2002:aca:4795:: with SMTP id u143mr2159275oia.165.1623741552782; Tue, 15 Jun 2021 00:19:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 15 Jun 2021 09:19:01 +0200 Message-ID: To: Claude Pache Cc: Craig Francis , PHP internals Content-Type: multipart/alternative; boundary="00000000000075f00605c4c8cae7" Subject: Re: [PHP-DEV] [RFC] is_literal From: krakjoe@gmail.com (Joe Watkins) --00000000000075f00605c4c8cae7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Morning, https://3v4l.org/nJhc1/rfc#focus=3Drfc.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 wrote: > > > Le 12 juin 2021 =C3=A0 19:00, Craig Francis a > =C3=A9crit : > > =EF=BB=BFHi Internals, > > I'd like to start the discussion on the is_literal() RFC: > > https://wiki.php.net/rfc/is_literal > > > Hi, > > I=E2=80=99ve found an interesting bug in the implementation: > > https://3v4l.org/JfSHX/rfc#rfc.literals > > =E2=80=94Claude > > > --00000000000075f00605c4c8cae7--