Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111398 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54259 invoked from network); 9 Aug 2020 19:34:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Aug 2020 19:34:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E28761804D9 for ; Sun, 9 Aug 2020 11:33:03 -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,FREEMAIL_FROM, 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-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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, 9 Aug 2020 11:33:03 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id t10so2855648ejs.8 for ; Sun, 09 Aug 2020 11:33:03 -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; bh=msvy/abiUp8dB9yQqFJy7xp7mlwk3kwFE68Jrsm0omg=; b=Z68jwJcHGPWaK84jrUtHvi4LGujYHcBGSude0h5qDKKKwAxSKL9lPTnVvhck3rQ/HL rpvfes1S5ggtPnCmZFwtNvVLh+5hGrVvQf0KPLKY3OwghKk4e2KgWkZQyXh8xTbHJtSJ 6fgmhsmFiXkrZ7LUE1IJ/MIyNuIJ46ftI4XqEQbgWsCnURg0IId1OWTQz+OyyRE+CzGE Lrll6mJ4pzO1phkNBPlY2G9pCBxNixTq0IFC6q44PoaYXN2ga3JyUT+8eDDT1zwcFAfH bCEBYpjkT+p0Bw1Vgwh4QY97Va/opiy9Rf6SQ/9RkPiSDMTJ7FSL52X3kvxoNOKSyNeP aCpw== 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; bh=msvy/abiUp8dB9yQqFJy7xp7mlwk3kwFE68Jrsm0omg=; b=Cxcin5hA9xRCLMWmBgl0lUA+LayYOXKKUlis23X2BKvHa5LFbrMq/dtRnwS2sI7a3Y t3Cecr2Sqaus/gcfCYY/zT4mxiQM1/mJfWFOs0MD7ss4nyPTZPrm/aQvD7MvHARFoy9r FLJWsYAnkLyHr5rgCn5OpaGHXKYoV8pY5p3OLCSL7QFWKl6OP9kcPx4NKAWxv3ALBNRf yQ3T1XWboM862KR1lKu+DXYYCodAY7PAEYhsQmLMG3TNG/yyeDpnfZtuII7VTUArsa7I y+M//h7j7t9ptp/EVesdv/CvH9q7Yspl+/ujIJBaC02+NZ1qfRu7dLxZ6Y8//jxdpCj3 AVnw== X-Gm-Message-State: AOAM532cvxW7L65guINXg54q3sbkKoclis3xuN8AESWOQPlxrF6/qR27 gK5HLOANxC5XyCNqMTWGb/GsDs+dtppTRXoH0g2BuBGc X-Google-Smtp-Source: ABdhPJxaoX6nnYMCpTFhPtrl3Rc/kCo30a9wpyJ34AwCqYweJBRZ6qAcQOzPhQ7EusXomMjmwe5RqAyOaUptn9DGazI= X-Received: by 2002:a17:906:364e:: with SMTP id r14mr17637282ejb.295.1596997981290; Sun, 09 Aug 2020 11:33:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 9 Aug 2020 20:32:50 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Null-safe property access in interpolated strings From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi internals > Do we expect this to work? > > $foo = new stdClass; > $foo->bar = "Hello"; > echo "$foo?->bar world\n"; > > Because at the moment it doesn't: https://3v4l.org/nLv3l The patch can be found here: https://github.com/php/php-src/pull/5966 It adds ~5 lines to the lexer. As mentioned, there is a BC break although it is probably very small (I could find no code that breaks on grep.app). Because this BC break was never mentioned in the RFC I'm leaning towards not merging this patch but I am happy either way. Let's hear from a few more people what they think until we decide how to move forward. Ilija