Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111494 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40654 invoked from network); 12 Aug 2020 19:03:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Aug 2020 19:03:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D9E111804D2 for ; Wed, 12 Aug 2020 11:03:16 -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, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from smtp.simply.com (smtp.simply.com [94.231.106.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 12 Aug 2020 11:03:15 -0700 (PDT) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by smtp.simply.com (Simply.com) with ESMTPSA id 4BRcxt0xRBz63H0 for ; Wed, 12 Aug 2020 20:03:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=givoni.dk; s=unoeuro; t=1597255394; bh=77A+bCQJtXDo7MiWsdJQK7yQKy64q6U0yMLErsz6EWk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qm0fn/iAN9uTj4TuEbBFpR245/Ota1oUgcCCM/wWh+yEgMvkM3rQmdHCANOOh7HlF o0+s+YVITAdQnqc5mlK98lPhhiVJxU5rMuoVP685yo98jNp/9pDnhNPK8qJRovDZDM 84g6ZBbmompC1betdgNo7Xd3cCsbrSq0lSEeoU/U= Received: by mail-wr1-f47.google.com with SMTP id f1so2910838wro.2 for ; Wed, 12 Aug 2020 11:03:14 -0700 (PDT) X-Gm-Message-State: AOAM532rQWPGGUhLAvlRmbPv0KL2cPPilcR70K9/rqcaoHJUKNHcr1Lu 16xBP9Yi9i45kHsoUOU4im4OjRwMHjYDdDePar8= X-Google-Smtp-Source: ABdhPJyB8fM/MCj5AMD+s9+jOQ8zf+hLKlWWCHb3OKg8e7fy9KdjjAAhaE0bzNuQAR3C+X8eRdqyM853k/C3UP3peBA= X-Received: by 2002:adf:9125:: with SMTP id j34mr402810wrj.157.1597255393667; Wed, 12 Aug 2020 11:03:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 12 Aug 2020 20:03:02 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Theodore Brown Cc: Chris Riley , Derick Rethans , PHP Developers Mailing List Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [VOTE] Shorter Attribute Syntax Change From: jakob@givoni.dk (Jakob Givoni) On Tue, Aug 11, 2020 at 3:03 PM Theodore Brown wrote: > > On Tue, Aug 11, 2020 at 7:26 AM Chris Riley wrote: > > > On Tue, 11 Aug 2020 at 13:21, Derick Rethans wrote: > > > > > On Tue, 11 Aug 2020, Chris Riley wrote: > > > > > > > Quick question. > > > > > > > > What is the expected behaviour of: > > > > > > > > @[Bar()]; > > > > class Foo {} > > > > > > That will error out in PHP 8, with: > > > > > > Parse error: syntax error, unexpected token ";" in Standard input code on > > > line 2 > > > > Is > > > > > > > > on it's own an error? > > Yes. Basically this is an example of valid code in PHP 7 that will > break if @[] is adopted. Wow, that was unexpected. By what logic? Also, how long must I wait before I can put a semicolon after the new attribute syntax? Is one whitespace enough or do I have to go to a new line? To me, suddenly disallowing semicolons at some points between statements or between a "declaration" and a statement seems to break PHP logic. Are there any precedents for this that I've missed? Best, Jakob