Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115392 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61466 invoked from network); 12 Jul 2021 00:46:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Jul 2021 00:46:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 41D5D1804C4 for ; Sun, 11 Jul 2021 18:09:38 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 ; Sun, 11 Jul 2021 18:09:37 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id q18so39511819lfc.7 for ; Sun, 11 Jul 2021 18:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YLxGVWbBeTZZeTENFPv5binXZnglCTl+yu3HFJxqnrE=; b=hLrG6JAmOoIs/Vs75z2k8wIQkW/PZw+PdwM6Ra1SjxxN0eRTcawsFbKF3OfKcq3V64 0R4CGa+kiqtrAG+EXj/11vhgiPiEpkya/FgoAFUBl++K/Lj3N/NRdV07RpzJo0QUOhOC 8rMHWdsLiiul8WW/0G5Gf8qNWQ1REn/0OGNrE= 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=YLxGVWbBeTZZeTENFPv5binXZnglCTl+yu3HFJxqnrE=; b=AEVFPz7nR+PJifNdWF5WFbh3dEx7zHcjeB9MOg8ZUbtmX2kv6mRLLqU4nXpF4b15Ce 5tUbA58CQFn4UBL7d4F0Yf6F5TUPEq8F0cUWpkREm44jgC29AszwdQR/UxpL1W0u9fp4 /DNprjTvgHZAArxzqPfXH3gtG9UNRaKtZJG2DBu0KWLKCho0/fMXfb03UdHpd9PNXE97 LTgcbSBRJD5NTJUj5eDyUz3qEkaO55ykGmnepGwWySiKCcciHklez5Yq/BrnppWNcaNe /l33qE8hzHKOdbNfrjDIRJOVrY0mpSe/f0ryQQ5WJ/JszxRNNe4IGuNKn2Jl2AMv57Z9 mtNg== X-Gm-Message-State: AOAM5317t2GiCrSmxPCngcwHLo8PD5fp0oOJ0XQHURLTxBBUT32S7Frp jcfeKc1aN9woCAJxR0frjjvWIDMRitvukOeVnMslqg== X-Google-Smtp-Source: ABdhPJw02t0DTrVlxIkRLl4fTD54sq9+kdtr8x+H+uONZm/008qnacYiVPtnVbEhOgIgB5ys6z9vTdi1tpTsgkiKu9I= X-Received: by 2002:a05:6512:14f:: with SMTP id m15mr37957790lfo.262.1626052173666; Sun, 11 Jul 2021 18:09:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 12 Jul 2021 02:09:22 +0100 Message-ID: To: Dan Ackroyd Cc: "G. P. B." , PHP internals Content-Type: multipart/alternative; boundary="00000000000032ae7005c6e2c672" Subject: Re: [PHP-DEV] [RFC] [VOTE] is_literal From: craig@craigfrancis.co.uk (Craig Francis) --00000000000032ae7005c6e2c672 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 11 Jul 2021 at 18:09, Dan Ackroyd wrote: > As I said in my reply to Rowan, making it easy to track down issues where > they occur, minimises the cost of using this feature over the years it > would be used. > This implementation allows you to do all of that. If you find debugging is a problem, you can choose not to use string concatenation (I haven't needed to). The implementation allows you to use a $query array, exactly as you describe: https://3v4l.org/aCFIT/rfc#vrfc.literals And the RFC itself provides you with a userland version of the `literal_concat()` function as you proposed, allowing anyone to customise it to their needs (e.g. only throwing an exception during development). But forcing every single project in existence to replace every instance of concatenation, especially when it is not necessary, and doesn=E2=80=99t imp= rove security in any way, I would argue makes it too strict, and would harm adoption. Also, thanks for mentioning in your email to Rowan the problems with static analysis. Craig --00000000000032ae7005c6e2c672--