Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117304 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19943 invoked from network); 11 Mar 2022 18:26:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Mar 2022 18:26:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 294E2180381 for ; Fri, 11 Mar 2022 11:50:15 -0800 (PST) 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.8 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 ; Fri, 11 Mar 2022 11:50:14 -0800 (PST) Received: by mail-wr1-f46.google.com with SMTP id u10so14482140wra.9 for ; Fri, 11 Mar 2022 11:50:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=b6s2EUsfVyCxmKDCfGm3DIVscMskpds9ByOMnp8xiQU=; b=OzQOxfkY3YiqT6ko7knkK9GX9twb9t4CRfkB3QxbXqIF0dRo11OeXlS9fH6Tap0+Y9 r/MyorZE3aV1QmhqhcWb5y4sc+oQCM9FQwfNY2tw4tf+LnfQ3PLCJ1J6f2CWerVvaF5X 86lzKUpUt+mzXkgjj9Bab3CwbKiCewTzTr1E+vMwTxhpkAHvLWMKz9ZBk+A4qaRBk+Xt GpBKdeFNFM9GKq1UC0Ey1IhOEdYzWG9+qwv4jMTAt9ZhmWaquvvqFYGFss6ZZW7yxbo9 1uOEMxAW0sBdoMy149mV38O7vrgzV2DaLjEV86nfU4H+VNVtiKLi1RBtpbeDn/Lu2Wzn pwMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=b6s2EUsfVyCxmKDCfGm3DIVscMskpds9ByOMnp8xiQU=; b=tPa5/upKpHz/TwABQyyBb2TEkt4q+XkHyAEgKPKNfRsWJjfMsq9vTdkoXkhIjZ1mmv cM0huiI0lBqj0FkmTAivjDX3zJgtHGgWZzixJryVJwULr1U4T9zIlHdHqhUjDA4OyIi1 UlJSYvB0Yf8ueiBZ9rtX4iDcPpFLbtOM7cJ5ehOv3xR6s0rsbrDVfBCdCrpIzLedBJ9Z c2fzCkUqatIJctNwc4hpZuLwua9/lvfltC8JfHpMxIHpTiXOlxjG5+ce9G8ewQqP3KSU aLwIauwIOYBanaU8jjnanjpH0+0wQ1YCFQkWnXndS8m9ripMfGE3iq5aT5MWJAqPclEg X4Gw== X-Gm-Message-State: AOAM530lM9w7B49fGjvgYDxRhgfspEqyVoIziNhbClJMvxM/dm9NxHf5 cCXhO7jZYrZXTNM6nnHKxwaI+3MW9Hc= X-Google-Smtp-Source: ABdhPJxYVcOYGY4yN5riCzX3QqkpNJFUOiDWn2Pwq6SN6O7u9geOkCtLScC8WckFuiDAQ6BwLK4usQ== X-Received: by 2002:a5d:6d88:0:b0:203:9397:7a08 with SMTP id l8-20020a5d6d88000000b0020393977a08mr4417128wrs.575.1647028213570; Fri, 11 Mar 2022 11:50:13 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id i5-20020a1c3b05000000b00382871cf734sm11519775wma.25.2022.03.11.11.50.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Mar 2022 11:50:13 -0800 (PST) Message-ID: Date: Fri, 11 Mar 2022 19:50:11 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-GB To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation From: rowan.collins@gmail.com (Rowan Tommins) On 11/03/2022 17:13, Ilija Tovilo wrote: > https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation Hi Ilija, Thanks for progressing with this, and making a clear case why these syntaxes are confusing and redundant. I presume the intent here is that the engine will generate an E_DEPRECATED each time such a string is encountered. Do you know yet if that will be easy to implement? I think some simple string handling is built into the parser, so there may not be a single code path to look at. The other question which I'm sure lots of users will have when they see the deprecation is: How easy is it to adapt usages of the deprecated syntax to use the non-deprecated variants? I'm guessing it's not as simple as moving the $ sign, because as you point out the syntaxes have different semantics; is there a general rule that users and/or tools can use to generate correct replacements? A final thought is that I seem to remember a previous thread (from Nikita?) about the "$foo[bar]" syntax, which is also confusing. Maybe we should consider deprecating that at the same time? Overall, I'm definitely in favour of this simplification. Regards, -- Rowan Tommins [IMSoP]