Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84775 invoked from network); 20 Aug 2015 14:25:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2015 14:25:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.181 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.160.181 mail-yk0-f181.google.com Received: from [209.85.160.181] ([209.85.160.181:33709] helo=mail-yk0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/54-00671-E63E5D55 for ; Thu, 20 Aug 2015 10:25:51 -0400 Received: by ykll84 with SMTP id l84so38995951ykl.0 for ; Thu, 20 Aug 2015 07:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=QgKPignI8gXqlGM3+aH8F1a9E+wuXsSBtlyvInguM1Y=; b=pNWNBBBBGoNEFZVd6Lfayh1vKxQhyIhnVVJAFOo5z9/cDjNDBzwA0EAb4gxpMvqyi4 nDUtKYOaAStfpmfSKhTphQIgOoOaxPCIQHLhTjJnQRG57bU61YmEbwcx886QQsSdDtEJ nvvQzA7/AIU+OtqqXbcwsV8JC+QhcQ0s2QNUfwcWblqbMG4ksIMneBptghbJ1ebrOSr1 WS3H39HClEr3u9B56QEYg4DeCPkUZMH7uzsMwqO+h9h2WfAQWMOFU6g6FKGyVpf59+Pf l9TfhmRsYcYA/g2kzLxMN4W+4GpK/uNd7pq6bti48Sipr+AoW+02sAp6FCblrPRCiFtu CEoQ== X-Received: by 10.13.223.9 with SMTP id i9mr3775975ywe.0.1440080747971; Thu, 20 Aug 2015 07:25:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.36.7 with HTTP; Thu, 20 Aug 2015 07:25:28 -0700 (PDT) In-Reply-To: <55D3AF40.4080209@gmx.de> References: <1439930857.5060.18.camel@netpirates.net> <55D3AF40.4080209@gmx.de> Date: Thu, 20 Aug 2015 11:25:28 -0300 Message-ID: To: Christoph Becker Cc: Arne Blankerts , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: Syntactical inconsistency with new group use syntax From: marcio.web2@gmail.com (Marcio Almada) Hi, 2015-08-18 19:18 GMT-03:00 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. > . > This one was fixed via PR ^ > 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). > Someone beat me to it, all fixed now. Thank you! > -- > Christoph M. Becker > Marcio