Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89400 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86034 invoked from network); 25 Nov 2015 09:57:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2015 09:57:21 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.179 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.160.179 mail-yk0-f179.google.com Received: from [209.85.160.179] ([209.85.160.179:34729] helo=mail-yk0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/90-14932-00685565 for ; Wed, 25 Nov 2015 04:57:21 -0500 Received: by ykfs79 with SMTP id s79so50656027ykf.1 for ; Wed, 25 Nov 2015 01:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=N8KUfD/cZ37tiOZ/wZ38tRxibhK3/5Q5JGHdk+AdgYc=; b=eVhp1H5zktllaF/fmkYNe8hLDUFDVeEPKhZZs2+IJTptGtFb+MK3ry7iAZNo7Y0+sQ MLftxvKar28cv5jbQF+MriCcFcqTThKCNW4+u6Bq+uBaNHIkauaHjD9+XVImT9w9kb/0 A0LsdiskSj02K0mDo9KwmodFs3ixhtCc89THPLTV8pjeJsE/fvKeb0hTZOobvSR9/E9H pcsEaTZ8MMCYpvJY6cqnMhx94FiEEfxOEcituzsGbwU9x0nzLHR8loKn0A5maEM4xPw+ 1RWSg1m0nvOYMdOF1way+VEaIa692fKc34iXRo6j4PnQv8pBXPDM5v/5pfIahd7u3KSZ MriQ== MIME-Version: 1.0 X-Received: by 10.13.242.133 with SMTP id b127mr28512321ywf.280.1448445437992; Wed, 25 Nov 2015 01:57:17 -0800 (PST) Received: by 10.13.248.130 with HTTP; Wed, 25 Nov 2015 01:57:17 -0800 (PST) In-Reply-To: References: <56547DFE.3080407@php.net> <565496FA.2010604@gmail.com> <84.DA.57156.C6B94565@pb1.pair.com> <56549E24.7030902@gmail.com> <5654BAE2.8020306@beccati.com> Date: Wed, 25 Nov 2015 10:57:17 +0100 Message-ID: To: Xinchen Hui Cc: Bob Weinand , Anatol Belski , Andrea Faulds , Matteo Beccati , internals PHP Content-Type: multipart/alternative; boundary=94eb2c03623ccee73405255a7bf7 Subject: Re: [PHP-DEV] Scalar Type Declaration Syntax Weirdness From: nikita.ppv@gmail.com (Nikita Popov) --94eb2c03623ccee73405255a7bf7 Content-Type: text/plain; charset=UTF-8 On Wed, Nov 25, 2015 at 4:47 AM, Xinchen Hui wrote: > Hey: > > > > On Wed, Nov 25, 2015 at 4:49 AM, Bob Weinand wrote: > > > > Am 24.11.2015 um 20:30 schrieb Matteo Beccati : > > > > > > On 24/11/2015 18:50, Andrea Faulds wrote: > > >> There's no syntax change. We'd be adding another fatal error to > > >> zend_compile.c triggered by a flag on the token. No messing around > with > > >> the parser. > > >> > > >> I understand your concern about the risk, but it's the kind of change > > >> that wouldn't break anything without it being tremendously obvious. > > > > > > I agree and we should be still in time for RC8. > > > > > > > > > Cheers > > > -- > > > Matteo Beccati > > > > Hey, > > > > I fixed the issue via > > > http://git.php.net/?p=php-src.git;a=commitdiff;h=569763cb1ac67f56e7743062ca8b3b7c650c1254 > > > > I think too this should go into PHP 7.0.0 as it is some type of a > language > > related change (even if not directly failing in parser...) > > > > > I've made a improvement to the fix( > > https://github.com/php/php-src/commit/00865ae22f2c5fdee9e500ce79d442467e0a0899 > ) > , > > before this, \array will result a syntax , but \int result a compiler > error, which seems a little in-consistent. > Imho this additional change is not necessary, it only makes the parser more complicated. However something missing from the original patch is handling of relative names like namespace\int. Instead of checking for ast->attr == ZEND_NAME_FQ it should check for ast->attr != ZEND_NAME_NOT_FQ. Nikita --94eb2c03623ccee73405255a7bf7--