Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117760 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13804 invoked from network); 20 May 2022 07:24:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 May 2022 07:24:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ADB28180384 for ; Fri, 20 May 2022 02:05:12 -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.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 20 May 2022 02:05:12 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id r27so8162226iot.1 for ; Fri, 20 May 2022 02:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=5T0GavZYhbOApwd37m/q56uBJW+iigfdLRskcxTOzEM=; b=VstRtpXv342u/0NLWw+V4E2PorH5ynl404bRv//O5dOjSflG/0dgA41dNe2vcPBRES 2J2fUl0yRtfziXwdBzH6QCoyYl3X1HMH4fhR5d0W7Bu2w2RQ765zR+/8WcXM7k2V7dRJ 4ecpEHudtdVijBgZlXs5l8bE0e4d9lggKFBNhAqXFT/IudQ2lXV2DYlEYW+wk1nM6RaO wrH/0+pRPXK/QetpNjAQTvfXZQU2o63O79LT+xmRuNkZO69ji5NhFRyukrWcGSaP9atI pHUZCXSjqZYzq5zr9hKv05Ct7wXlddPNLOBdodhBFj7eSymQp2iQRmXsKkjfEKFbtsQP eNKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5T0GavZYhbOApwd37m/q56uBJW+iigfdLRskcxTOzEM=; b=BaaiiNaJogeYl02Ypv+fu4NnYiXJKTRGHgLLCxUbdr1bJ7VYdiL/uc3GALDlaQkqH1 pE51AXgAefgk+VNo135p+nXYeSkCho1Myu4GwBouDoE6E3yRpEFB8SC3wlynfysVD83J WDlXnk6QGJmkUU7GGzbqc6kthDwbbdOWbpBnvXWQ8cllcygdB3wdxjPYJyxkUut7uovb IEvj1a9wLf3vyLMmacrJaDyvC9H6gJL4kf4zIwIJc60CGcYoZkAIVzSS3xnMUuMHuQLU xPQxz2/HlkS0GUE8IFA4GYcZOdhav3WPGjhev+PDGcW3scrjaHkqn7TnUEXJYhTFTn/n 0P8g== X-Gm-Message-State: AOAM530YOnCyikENHZ2ZXgs9TnfDaI8BSHJCP7upIX3trf9eNRX11QCr 6HB+O5bzAC+Y58AziELY8Kqe9XtjRjM6P+sc9l7dTvNYd6GhJg== X-Google-Smtp-Source: ABdhPJxwThcJhpmShLdPMWUvy0rjBkwZGxjD+imuuDhZGNaTpabwJ/weopE+Eo4gObMEtVGVxYNyVPo0iW3R2wVn2iQ= X-Received: by 2002:a02:908c:0:b0:32e:5d36:60d4 with SMTP id x12-20020a02908c000000b0032e5d3660d4mr4939632jaf.116.1653037511114; Fri, 20 May 2022 02:05:11 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 20 May 2022 11:05:00 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Removal of ${} string interpolation in PHP 9 From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi everyone It was pointed out to me that unfortunately the "Deprecate ${} string interpolation" RFC didn't specify *how* the feature would be removed in PHP 9. https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation https://github.com/php/php-src/issues/8501 There are two approaches: * Completely remove the syntax and make "${}" result in the literal string "${}" * Keep the syntax in the parser but throw an error It's pretty clear to me that the latter is preferable for two reasons: 1. People upgrading directly from <=PHP 8.1 to PHP 9.0 or people who have not addressed the deprecations will still get an appropriate compile-time error message instead of their code suddenly behaving differently. 2. We can reuse the syntax at some point without causing another BC break. The only advantage of the former approach I can think of is easier (or rather no) escaping of ${} in strings but this could also be a drawback considering that it would become unclear what the original intent of the code was (literal output or string interpolation). So unless there are concerns I will amend that in the RFC. Regards, Ilija