Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110060 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75965 invoked from network); 7 May 2020 10:12:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 May 2020 10:12:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8F5381804F2 for ; Thu, 7 May 2020 01:47:28 -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,HTML_MESSAGE, 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: No X-Envelope-From: Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (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 ; Thu, 7 May 2020 01:47:28 -0700 (PDT) Received: by mail-il1-f179.google.com with SMTP id n11so707780ilj.4 for ; Thu, 07 May 2020 01:47:28 -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=FtwnFeAVLsQJ01H8U4c5WnSybBzGap2JoKwPEuiadUM=; b=m7r/RyWqmEmsl9jWCOLZW6A9UKuyyOIE2ezWQVRFgqE9n0zi6VllxUp9+txtcrGTe+ Sf5Y834edKodOXMBR/u0X40WQIlCuoYLBRft4NMopg7XGQl2c64jh3eK7H2sV0u+KdAT JtaW1kTs9Nn/eYxeSZ5mVWGJ0wdihCEwOTWufRHxy0GhPe5irXTouizDu8bOwvXELEc1 VZBYNJi9DL6iTWhJAd5a+UgLzKfKt9yCq3Wwd6sVkWRr0SsMgJmKCb84mkbtXzkDDs0x eojutp7BjBE32i8ig0Br5aI228In20ZqeZCkQ0mYvXOtk37KgYr+NiHzX46wY0o/fxjn b3OQ== 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=FtwnFeAVLsQJ01H8U4c5WnSybBzGap2JoKwPEuiadUM=; b=dGwo/MZGwh/7PMvOZc3OLy/+TUT9R4ikyuS7u4QpkuIjHFeGxNAflGilURHObzaHrM K1vArhWXz1NwYJ+PS8DjRh/VetLDFkqJa2y2ORqOOhR9/ywGTxtxwmGhsg+Ynj9VyKY0 9g6ArhsRGDUijLbEa3g+AE+ShSdgUF5sW5kp12SfdjCtNaA309XduCogkfNE2dFrqfpn tDGrKMYVsfDVfvcVHX1Flo5Zh/VgL7hgB7OwzmgxvWQnKAeOquTz7HYJhKXk76CEuf9G COprPuKIkcSYJyu99oRpF81zyG219APHtFf0CqIQN2ARdqVZJ714cZ8EjKdN6rDI9N0Q 8Zow== X-Gm-Message-State: AGi0PuaX2UvKu3uEHhyZe2ZMaWZPDUKCwnvV4yRR0azWOZ0bqCZkGgIi IcedxQI8rVBhFcTLzF3huUNAGAEoh6yrSdL+PCpdswn5 X-Google-Smtp-Source: APiQypJ/nm2MnJDA+EBnn3fXXAzT6PMF4RIfktfOgK3C3NTzbKX8GSiY1xkMZauMRS9VRxybiMx78BOPn2BDZSChFw4= X-Received: by 2002:a92:159c:: with SMTP id 28mr12809038ilv.172.1588841246596; Thu, 07 May 2020 01:47:26 -0700 (PDT) MIME-Version: 1.0 References: <1C09C0A9-1DA4-4753-8E5A-A739D52DA0B3@newclarity.net> <54c5f8f0-1526-53df-0912-0b00e0e54bc3@gmail.com> <44B0AB58-2993-403F-B75C-124AB26B6875@newclarity.net> In-Reply-To: <44B0AB58-2993-403F-B75C-124AB26B6875@newclarity.net> Date: Thu, 7 May 2020 09:47:14 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000001ba71205a50aee88" Subject: Re: [PHP-DEV] [RFC] Parameter Blocks (vs. Constructor Property Promotion and Named Parameters) From: rowan.collins@gmail.com (Rowan Tommins) --0000000000001ba71205a50aee88 Content-Type: text/plain; charset="UTF-8" On Wed, 6 May 2020 at 22:48, Mike Schinkel wrote: > Now, consider the following two examples. On which line would PHP report > the error? > > function foo() ( > > public $foo, > > public $ bar > > ) {} > > > vs. > > function foo { > public $foo; > public $ bar; > } {} > > This feels like an implementation detail of the parser, rather than an automatic consequence of the syntax, and the current parser seems to handle it just fine. If you need help visualizing it I mocked up an example from actual > function that is in product that was written by someone else before I > joined the client's current team: > > https://gist.github.com/mikeschinkel/faaee3fc8ccc2371c7200f3d634289c4 > Here's the single-declaration version of that with a syntax error on line 163: https://3v4l.org/mGq2f I think you're solving a non-existent problem here. Regards, -- Rowan Tommins [IMSoP] --0000000000001ba71205a50aee88--