Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111421 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43024 invoked from network); 10 Aug 2020 12:03:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Aug 2020 12:03:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7349B1804CD for ; Mon, 10 Aug 2020 04:02:30 -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,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-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 ; Mon, 10 Aug 2020 04:02:29 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id p20so7744341wrf.0 for ; Mon, 10 Aug 2020 04:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sensational.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jG7ngNZTzINAxZ6zTOycwmYcMd01Pw88z6OidRg+6qs=; b=bVnmoKXaqHSieO7PaHJetAKd17AuaUf/QKevzpcRV2Q9XI5VHkUBuc00VFeDl8DDtm w4y5esa7Oz8Dh0/hVGssouQUBPHm0NxWHG6JG6sBZh76oZGN52FoJgTvqPLkRu4+IGkY C5ndnsGJXSlMXM1uDjwPzJmAo9r1PuRTS1YQMHgp0v2rimATCHeBBTXlz3CMwYkKokkG cJDDXWGcNNj5taVvGzgjuTzj5PRHPRs3n6ybM9TCUUHMYY6L47liSW7FZAggzJTx1w4C 4vin7p8MZ3S5ONjHSXhEJtajaMiuMK0gBxydqQ9HeFpwV0egV0s1c+MSMg87xkmuCWAv AEMQ== 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=jG7ngNZTzINAxZ6zTOycwmYcMd01Pw88z6OidRg+6qs=; b=KIWX7keHgVG39twfnGoWQPgbTHerKr3HAc6gThuT2eu21bzaCW3LB8cgRSqVMBuchw eosg3Tl5IT5iRIWNPg4goW4F1PjVtRxqXoKUb7mq4ULcwSThd+PUO72nBtgCaoSVSSSp nSFfYsJy6kDbqJzHtdp3Of5gSMLWD1iwLn31PSfoXXKOH/xsZ8CEkOabBAK5BbilYXPD OI5NPJu8KOG1+iXeWDWNh6zTERlifpBAu4NSEobX0z77ilFguE3+c4/r76waDlD3OEBB nWj+Xy87iz1v4N1tObGR7HJBNPnyThD8xy0zXtEUjFkTmcvKLCxY8QB0hAY167FZxKm4 UFdw== X-Gm-Message-State: AOAM530DnqXfj3vLF3qxbxnvHfuRdj2s6htRCosWMFKSrxgXT4MzLnWX N2vFcRzDEgBCQcvnfEq92pwZq6CsAPWmEH9G0nqd2w== X-Google-Smtp-Source: ABdhPJxacPxVjHZQy+g3Px5DHdV6rG4IBVPd2rjH5R08FxfWnrt7ZGqXkUtM9EGhd9rwxgMscTKAgGLT+d4NrzQy8aU= X-Received: by 2002:adf:b34a:: with SMTP id k10mr23735946wrd.402.1597057347735; Mon, 10 Aug 2020 04:02:27 -0700 (PDT) MIME-Version: 1.0 References: <24ce93f7-b5b2-fb63-6ea4-032c4e71f049@seld.be> In-Reply-To: <24ce93f7-b5b2-fb63-6ea4-032c4e71f049@seld.be> Date: Mon, 10 Aug 2020 13:02:16 +0200 Message-ID: To: Jordi Boggiano Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Null-safe property access in interpolated strings From: phofstetter@sensational.ch (Philip Hofstetter) Hi, On Sun, Aug 9, 2020 at 8:34 PM Jordi Boggiano wrote: > Can't say I'm big on interpolation but I'd definitely expect this to > work because why not? A reason why not is because it will break backwards compatibility with existing (though admittedly unlikely) code which also can't be fixed by easy search and replace: $foo = "gnegg"; echo "$foo?->bar()" would be fine in PHP < 8 and would blow up with `Uncaught Error: Call to a member function bar() on string` with this change. I'm not saying this is a problem because code like this is unlikely to be written, but it *is* a BC break. Philip