Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112004 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49756 invoked from network); 5 Oct 2020 11:11:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Oct 2020 11:11:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0C4A31804C6 for ; Mon, 5 Oct 2020 03:24:24 -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.21]) (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, 5 Oct 2020 03:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601893461; bh=xO0RmvybyD8ih8aIkY/d+tJfUNgMuIYY+QQvxSLjR4s=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=lZBuXNEXx35F4jXZmhaecdenUgcA7qWmSE4h9t2AdUL5S0RyoRT68Vw7DHc/9uZ0e wklSb6YogoV1DPRCXIoHP9uh6RGxs7APhdZ2sRze4KqLR22qGnnRKI7p2zTsR28HI5 pGdPNTR92dRVeeGXik4iQRIqt4Ldrb4h2nhODw2s= 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 1Msq24-1keaAX1Pcu-00tDbx for ; Mon, 05 Oct 2020 12:24:21 +0200 To: internals@lists.php.net References: <446c9894-191f-e53b-4534-31c4e7b91d7b@gmail.com> <881e2335-5f81-0d79-6a17-06bc20f14223@gmx.net> <7e50dba8b8749b9e32c803d7ded20fab84e21dc74ec9a55d8127e961bb036cd8@mahalux.com> Message-ID: <3711b2af-6768-5f76-8e4e-12748cf63eff@gmx.net> Date: Mon, 5 Oct 2020 12:24:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:gpO1wL0GqJj4mxL3eQWch6jSiKnSYL59EUHxZPNLD0wK9ViCq8D 823Gd87Iu22Pk8kD2Y3GL3TAn9ABdlfnVmLiJwDlkOCvipIvTaSuEn56YFRGcmelzJdZAru 2YgZLoVNnwZC2blvNsb1RCTBBEX5A4FEK11rZXYBU1WqZN1UoEhidxwXBQDHnsdpKNYyoIV FpaF8ZUEEJWIJttv9zuDQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:mamh9gzXE3U=:qyEPs4hJdMO+z0EsUMeOnQ fi1/nDdYfIKui37Lt1iq4XKQ/KCVmsZC+/F+OYAqaf8iej+9zqpX0tvaBudQ5Cn4xBlb7Dp8D sDs4KRLSlG3SAwid+oItdIo7M/rVipdOxuRDWT/IfdWTCCmlxnjYAXhvra0/Ej83CInPGfno4 TjCsCYxdsDKbrMQDPhvczjbGo2X+mJbeA2CVCaSp4mTFBADHfQML1qAwZgur003LFYcE/c/WC jbbz7O+vUsIg09yisq4Qior8v5TzgcZLxoumNzViBKCONZ6s2bdcD2jQer8knsBcBmtr2921Q bVzGsHy8gRfXs+OqwiaIhlmIV6y3mjtMvGPdY+0ZuKfXO8tAaWtb4ZqOhu7dvR8GuHEvMPH1m H6rLUe1dnci5B75AU1ArRPU7gLQoTLcYPInfnCpmZilFr7IVdjtMjaBVcf8AGdsBF2P0/3qu9 txKg5DrcCdyi+zaBSTEvgtV8roY9rhOLJzRQ0qGRKCotJRd57aU5J5rFCRu1q6aX2bsfgV/wx tjmogn9hfo5hNNHx2c+hauOaZPnuX3D7HL3e7ni0VkJVeougB1kVZMHGSsmdRQbYnv2gR6V8G 0aZOTEQZoDSsAyDhjBTy71gu1o+GaHhu9Agkx3KbO/I5cav+1hmEH6qh1jr8LzL1nggyfNmJ8 5HzTd7mTyCmL0G2bL3pkTrctLHq73FG788RwUKLhdvod53dQhuc1Ov5xL9qCMXzumr93WTjJ+ 5oz61GaMPZJlQh+P6HiUGBlquGWoBD7DGijUGpvXIZAAuqlpXWS+4mImqUjF5YxYH5iSBSbjM gCcKvM1DeRehg7jH8b+oNtFF5EkjTx6Zr1ojPf3bRrpOliamZtvgkgKuXI1SGBSN+f74YTb4K yr9Q0ovChRwMCU8QBwXsAVWKWLTG9mugN9bi33AzOnyZ02VDfsBqwzzA23o8/N8YSlENUtCa+ gobi6T76KDIp3AlIi2sGWKqmJ+UW48z/bxWN4eOvHSwsMFgqWt3Xupi86iiCjShW494l2lGas M4vD8aOCAFRBWMEd9bBxRd0naK8V2fqCALxDn7LlSkK8ZLn6ir0Ei3k6TEPBWqFLcsKls/r9W Nxv0RAQmFH5V3brjpLlNzH760l/6vB1KIAQsXOuP8xhGXK/92fYlR/BN6X/VASaBXX/loexJm 7xzEm/Gf1MNlmA2pnTGdKQ/xAygZM4TNqYP5OGRTvXzT67s2SWLnql8k6nRBi0nnTIHj7q1d5 2nc2zrw9bNFTNmVJVnIX7+6IqAoyYZwY+tn8uAQ== Subject: Re: [PHP-DEV] RFC: Support for multi-line arrow functions From: a.leathley@gmx.net (Andreas Leathley) On 05.10.20 12:08, Lynn wrote: > How should php deal with the scenario where you want to `use` everything > and have one variable by reference? > > ``` > function () use (*, &$butNotThisOne) {}; > ``` The easiest would be to only allow "use (*)" with no references or additional syntax. "use (*)" would only copy all local variables into the closure, no references. Personally I have never used references with "use", I think it is much more niche compared to the regular copying, and there is still the explicit (current) syntax to do references.