Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89431 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66155 invoked from network); 25 Nov 2015 19:58:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2015 19:58:25 -0000 X-Host-Fingerprint: 90.204.81.227 unknown Received: from [90.204.81.227] ([90.204.81.227:8145] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/B8-19088-0E216565 for ; Wed, 25 Nov 2015 14:58:24 -0500 Message-ID: <23.B8.19088.0E216565@pb1.pair.com> To: internals@lists.php.net 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:58:20 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 90.204.81.227 Subject: Re: [PHP-DEV] Scalar Type Declaration Syntax Weirdness From: ajf@ajf.me (Andrea Faulds) Hi, Xinchen Hui wrote: > Hey: > > On Wed, Nov 25, 2015 at 5:57 PM, Nikita Popov wrote: > >> >> 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. > This is how I feel as well. You can't make a class with that name anyway (at least for now), so we don't need to prohibit it. \int was a problem because it was interpreted the same as 'int'. Thanks. -- Andrea Faulds http://ajf.me/