Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87783 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27097 invoked from network); 18 Aug 2015 22:18:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2015 22:18:43 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:62718] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/83-23925-04FA3D55 for ; Tue, 18 Aug 2015 18:18:41 -0400 Received: from [192.168.0.100] ([91.67.244.142]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LomuB-1YpTFe0J9X-00grHn; Wed, 19 Aug 2015 00:18:37 +0200 To: Arne Blankerts , "internals@lists.php.net" References: <1439930857.5060.18.camel@netpirates.net> Message-ID: <55D3AF40.4080209@gmx.de> Date: Wed, 19 Aug 2015 00:18:40 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1439930857.5060.18.camel@netpirates.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:SqYAhrDzer0f4JU8Ob32Tc2o6IJNONLE8zA7YnbKznA6E/APiAM uyWI6sQmS2FeMTyW0R46eRMrBJChvtZIqPqgrtuwVyvtxi+kapat04DdPDZJ+/a70MfS022 dag7xWIjqhQXVSsJgEc5TW0ysAJjHbIH8GngTB/f5386FB6788H2uOjEZdbiASuhHJZSG8S zvnLZtv88+lQ2zw+KTmwQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:5/hDKYPDZbk=:E4vAznpINyLyj/bsqqJI0l j1kChh9eV0i+JI1NIrRNjY1Txuc/4bIy2brlTtM7YVhYSS0dWN/av6ggQMnpnGODJZjX00yyc 0/ht8o8dTIflHcRUc5jX0Ijk9zm0+mlFYml2hxxN4NG7fwPuv6/LEhT+wZsiPOZfs+Dc4oq7m F7+YAJnZs8gwI/QEy4KcY5Heuy7FY3IY3Wju7C3jmFqC5ZnEcaUsC16FVh/5TM9/hG4JPL2N8 s7MgwSuWh2TLLi8BvrxjuLFWVHvjcnPAfqJ7otrmhkZgHqPXhx1Rb3UPqGD0cMymA+/AQ8zHs 2bYa0BmGVE8BbDHv4+e3VchTcyGvqDIiA4GstSJ7Shqw+FtllZB/JtMFt6xIh3LVtxvQom9hR bSVf+Tl+f6Sd2fima9kpeb3vz9M7nGXDdvO1pNbbvn2Q8lImBfQjTP2e5VaOWi+5s7AonDSrn 3XR9gUQtN8d1QE+5Ku1dMUQh1904t7SxCvtt0G2hr5IJXLHyQmXjcR1vN+AxiMxfaLrJOCNDj e8L+giLI1E92vrrS6pdW8oWznkbLTwAGo0CUQ0sYWxaFBLCf5GM8NZPcbl6jjV0r+ZXfUwg4P PkvRTHL9N0PPLDsRpJ7j205GLrbCo15eLLDWkXJsWxzT7XFCWuz80AtQRzc5s7wGSceYGRUYQ a3byjjp4S0EEUiJIQYLz6hMhZ46sgVLjyeig38MQ+PCNdYSbpt7lbK36iH05V5yXNt426hIvV wsxbeTFrMTs2ltV3B8YwRIadNzGq+0ushY/tQA== Subject: Re: Syntactical inconsistency with new group use syntax From: cmbecker69@gmx.de (Christoph Becker) On 18.08.2015 at 22:47, Arne Blankerts wrote: > while playing around with the new group use syntax, I stumbled upon an > inconsistency of which I'm not sure whether or not it is expected. > For the "classic" syntax, while technically pointless, a leading \ for > the name is considered valid and works identical to a line without it: > > > namespace foo; > > use \some\bar; > use some\baz; > > > With the new group syntax, the version with a leading \ is considered > invalid - a lint will PHP Parse error: syntax error, unexpected '{', > expecting identifier (T_STRING): > > > namespace foo; > use some\{ bar, baz }; > use \some\{ bar, baz }; > > > > > Is this a bug or feature? It seems to me that is an oversight. The resolution would be rather simple, cf. . However, while looking at the grammar, I've noticed that the entities inside the braces may start with a backslash, what I consider rather strange (particularly as there has to be a backslash immediately before the opening brace). -- Christoph M. Becker