Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87781 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22607 invoked from network); 18 Aug 2015 22:14:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2015 22:14:47 -0000 Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; 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:35363] helo=mail-yk0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/C2-23925-65EA3D55 for ; Tue, 18 Aug 2015 18:14:47 -0400 Received: by ykbi184 with SMTP id i184so109031577ykb.2 for ; Tue, 18 Aug 2015 15:14:44 -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:content-transfer-encoding; bh=zyyDfHs6EcMuhUyk9ZR1RjUlU4VROyCn2CmRK98Zy5o=; b=pq8ScK0u4MQXXtocFid0E02hJaAGkrUB2YdchYaseTblPb40NtZQZdTTTnLiKibhe3 LhrlLUwv+eM+xxnxKi/mIRYMsNXoA8kNTe7AGU8mO/xfTZ+mdgjhQMhylCCa4jnYA7e5 hsghC71QM4+FUc0csAQoJkilXqeYi/c3FIva62nKlo2vzPQC3X2NV34wo6SWBoScyj3k RF4Ro7H5c6pGNaxCj87PvO4Tl7KI5fstTCUbECOd/Zz+NRB/JbufC0XQqtsCvgTaXlIL uQujAN3DBSulMJoHNyNWlVdRMQ0BBQ9IILvoeJKldmcFcDW6huW4K8vZTcxmb8jfycnQ ZERg== X-Received: by 10.13.242.67 with SMTP id b64mr9539714ywf.74.1439936084007; Tue, 18 Aug 2015 15:14:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.36.7 with HTTP; Tue, 18 Aug 2015 15:14:24 -0700 (PDT) In-Reply-To: <1439930857.5060.18.camel@netpirates.net> References: <1439930857.5060.18.camel@netpirates.net> Date: Tue, 18 Aug 2015 19:14:24 -0300 Message-ID: To: Arne Blankerts Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Syntactical inconsistency with new group use syntax From: marcio.web2@gmail.com (Marcio Almada) Hi, 2015-08-18 17:47 GMT-03:00 Arne Blankerts : > Hi everyone, > > 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? > > Regards, > Arne > > -- > Those who do not understand Unix > are condemned to reinvent it, poorly (Henry Spencer,1987) > This is definitely a bug. The leading slash is part of the main namespace spec and therefore should be respected. This should have been more explicit in the RFC. I'll send a pull request with a fix. Thanks, M=C3=A1rcio Almada