Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89405 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99970 invoked from network); 25 Nov 2015 11:10:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2015 11:10:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=xinchen.h@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.213.49 as permitted sender) X-PHP-List-Original-Sender: xinchen.h@zend.com X-Host-Fingerprint: 209.85.213.49 mail-vk0-f49.google.com Received: from [209.85.213.49] ([209.85.213.49:34609] helo=mail-vk0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/43-14932-B2795565 for ; Wed, 25 Nov 2015 06:10:35 -0500 Received: by vkbs1 with SMTP id s1so32054434vkb.1 for ; Wed, 25 Nov 2015 03:10:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=evkYJ0ZGctjj0pkwYGgygqET5Iy5rLZsx2NoWs1V/iU=; b=WC6WA8CTvMefPNr9DT62lO0JjgI5+pIGjRB1neA4/MIdn97JySICu/0z0nuPNLE/Vh ZJrucp1PcEkn3hCD1ZOAoTMrr841TPCR+kdZVqaBNBudXA4W4xUqRaJ2jsJJPiSXjn36 aY9jv/jHccXGMcZ8lfePsQTX5KBjAdgq9LKB1kKhm/B9bsQ60pvg1GmUk/LchUBsQSn3 ez51M+Gb4HM+OjpKgGVdd1hlBzL88IHx75TF5tqPXXvusyxQn9vsjfdIQoA2iEsz9mvU gV0h9s1rU5ToNUqIofR50+qfdmTJIscZKlmaIfx4PNue344b2uD0Z8pYNEphClktBijA 5VhQ== X-Gm-Message-State: ALoCoQk97T3hKEL3dBLJa+xsZZCY6ha4Du4FEURYWHk+oIQlpy25COpYMIKwmsnwumRwA0AO+oESduve/zXfjrnteXvGAZ2B+b6Da0XmD9Oq/1aMnRKHsaVwECeAc9XfmA2nyZVCzORZuTUJhMwudgFO98Ko/y6/R9EdSOYKcqvNLOvJHUC2EYk= X-Received: by 10.31.161.68 with SMTP id k65mr33573634vke.74.1448449832661; Wed, 25 Nov 2015 03:10:32 -0800 (PST) Received: from mail-vk0-f45.google.com (mail-vk0-f45.google.com. [209.85.213.45]) by smtp.gmail.com with ESMTPSA id a144sm17988827vke.15.2015.11.25.03.10.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2015 03:10:32 -0800 (PST) Received: by vkbs1 with SMTP id s1so32054213vkb.1 for ; Wed, 25 Nov 2015 03:10:32 -0800 (PST) X-Received: by 10.31.162.16 with SMTP id l16mr33370657vke.69.1448449832010; Wed, 25 Nov 2015 03:10:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.229.7 with HTTP; Wed, 25 Nov 2015 03:10:12 -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 19:10:12 +0800 X-Gmail-Original-Message-ID: Message-ID: To: Nikita Popov Cc: Bob Weinand , Anatol Belski , Andrea Faulds , Matteo Beccati , internals PHP Content-Type: multipart/alternative; boundary=001a114402deb6717605255b817e Subject: Re: [PHP-DEV] Scalar Type Declaration Syntax Weirdness From: laruence@php.net (Xinchen Hui) --001a114402deb6717605255b817e Content-Type: text/plain; charset=UTF-8 Hey: On Wed, Nov 25, 2015 at 5:57 PM, Nikita Popov wrote: > 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. > PS: However, namespace\int will result error while checking valid classname, as int is reserved keywords. so I think check for == ZEND_NAME_FQ is enough here. thanks > > > > Nikita > -- Xinchen Hui @Laruence http://www.laruence.com/ --001a114402deb6717605255b817e--