Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111427 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 60439 invoked from network); 10 Aug 2020 14:34:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Aug 2020 14:34:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 494C2180509 for ; Mon, 10 Aug 2020 06:33:27 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, 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 mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 06:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1597066404; bh=ynQJc0/ECEeg/Gn6N1MSJnf7jW5NNGFeHxi9cSA3Nmw=; h=X-UI-Sender-Class:From:Subject:To:References:Date:In-Reply-To; b=fxZgoc9zhPN7U1QnOoJgIjR8YqoLRHIyb/cPtC9clK9JVI1pfZK3nxnA6RYeRJL9F ChmsvKuR1CuYJEaeQdV5EkT4GTHzVxXzUgN5Zr2T+J8DqL56m50A/GUF0mbYlEZA8x URl19NbFVFnH4t+yjJueQKlKZi/PWbsWf7c8vzU0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.120] ([24.134.51.41]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M4s51-1k6V6Z10fX-0020GJ; Mon, 10 Aug 2020 15:33:24 +0200 To: Benjamin Eberlei , PHP Developers Mailing List References: Message-ID: Date: Mon, 10 Aug 2020 15:33:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:9pokj9wIvtuBMMMHK5NmSZNhqdYGSrrAz7+w4nTTVa/nYedpO3W H1x8oiQQ2XTbAMUJWkfiaKXX/W24FLVt8tvrcTxtFfeBzsdfDp1b14vpeJfa2VUsaoNComR GULmGDgmBI57WkFFpdxY5ttRpNTx1VmqPH+7RbGzRvSlEhwNicEjU1NYg82OfKFtVis8tk2 Ir7X0+9qf1Kr0sa5w+PLg== X-UI-Out-Filterresults: notjunk:1;V03:K0:V+S01AVTlnw=:nck9S45PHMz+SiomKbGYYo 2CrjArq+RSy9z3LWECOzJd/ZvXN1JQWAALGs9zMmekd83z51f4O6GrbikdrGQvTEaX0VFxMfB krlW+Pyo+PgrySg6Dd5I1eHht9aTYU9MoBklor6lFMpwnlzO1ZUWCd3lG6x1VqI3YGPRCi6e2 FzPZKNQBwUeTcuut1CG/Q7iZ4DON4ZgipTBRat+BXg89Om5WeeIuDHntnpNmSL0cAg8ejZ4IU lUcvNMy6pLN0PJF0nrDj+qaxNDqGcd2ova2K8/4sKt1E0/6pzmBKd38BJop2fEkPTxoaL5hQj YzXTxDUNreqn4muLbdd48qxiY/hafGnVaqI5iaUGPh60ck8po1KvV9Zzia1Gs4ZoUpp8g5pGX kBWkkLAysSiFo5t5vAPHw3XLvBN0Orj3XPDkiAXQZZhmUa2sBPyfNb77Ef0DchVqrJaUH//MJ 5ztmxnuKp3SqV/AVd3NYdcY0Ezo7RDXqx8/UYyv6Qygf96GLDfszI3dmnTDTNAEWYax0i/0xY F/vJrEWO6+80Di4SFhHqlxJLkss6hIPU2Zm14rDyK/nlyfsgHj49BUoS6erh/4bx4o5mppyAm KRyzJtKU6c4TnBbjEstYn89H4SFslrEiIe8kifOHz/sM2LKEQYFpGJg4sZ683oiZsnK6/Ogss 5j2N7ipXOl060bq70enJFyqimmmbXP169ofg4EmMP9+Kjjf64W33gsmMN7TypQK83QVnqBmOc SLzzPpchNCLlU/BlhInGLOLpj9DA/bTii4bTdtte48Lku296YZ/TtOzuDIb1TQRELPBUr9C4q Vh6HA/4a+L2BAfzD9nspjiiSRg6ZnAFbS6iI0jiP/U2owf1mZ4EVufCVcefnOvo09c5oT9h0f cKk4dhgqkblpRPHQLOhNOzr2WHuKTVVOAn4TubC2qQb3MJPmVuYX69rcXMj+y2/1+2S7nE6Kr GfbmsmkzyOjmy/lMMx5BEYEqq7lHc8nW8PH1vHlJkM6RfPH5zx3OWVYMMmx2kHjr1s/5o+eKQ UZgFXLlpZLNfJffDir5XhDVC2qCtGhlApnWeEQqm3CW+37S8v7dH+lxM/UqibgGRXbwvepfyu ZnOkN+0b7buWRmWGlQr57Su58UEwnf7zsAf0YV93UCPmUH09uFFPJiM1V6RTAdR89s4G3H5Sv 66oZlgsTTuvF9Q+wPZ1NcokypwgCejmyAo9qRCyFJm/1JUu/rDwEPNG3L+yixw4kNn8dKXc+o TigyhkGhHSA/5YxdhWpAwzNUDxoB/jtqRO/7JDQ== Subject: Re: [PHP-DEV] [VOTE] Shorter Attribute Syntax Change From: a.leathley@gmx.net (Andreas Leathley) On 10.08.20 15:08, Benjamin Eberlei wrote: > () does not count as ending symbol, because it is not required, as > such its > not an ending symbol. > > The point Andreas Leathley makes in the discussion thread about new Foo = not > having an end symbol demonstrates exactly the opposite point he was tryi= ng > to make, because the new statement itself has to end with a semicolon: > > new Foo(); > new Foo; > > A statement has an ending symbol semicolon. While I don't know the exact internal semantics of PHP, according to my grasp of the language the new keyword does not need a semicolon at the end - it can be part of any expression, like "new Foo(new Bar);". According to the PHP manual (https://www.php.net/manual/en/language.basic-syntax.instruction-separatio= n.php) instructions in PHP need to be terminated with a semicolon, while "new" as a keyword has no special requirement about a starting or ending delimiter. The point I was trying to make was that new and attributes have the same requirements in that they both need a class name and then optionally arguments for the constructor to that class, so they are both narrow in terms of what they do, attributes even more so than new, which reduces the helpfulness of delimiters as you cannot define arbitrary instructions in attributes - it always starts off with a class and then any possibly more complex instructions will be in the arguments, and those are enclosed by ().