Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89385 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21047 invoked from network); 24 Nov 2015 16:47:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2015 16:47:59 -0000 X-Host-Fingerprint: 178.62.40.5 ajf.me Received: from [178.62.40.5] ([178.62.40.5:22667] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/C9-57156-EB494565 for ; Tue, 24 Nov 2015 11:47:59 -0500 Message-ID: To: internals@lists.php.net References: <56547DFE.3080407@php.net> Date: Tue, 24 Nov 2015 16:47:55 +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: <56547DFE.3080407@php.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 178.62.40.5 Subject: Re: Scalar Type Declaration Syntax Weirdness From: ajf@ajf.me (Andrea Faulds) Hi Sebastian, Sebastian Bergmann wrote: > The following is currently valid PHP 7 code > > function a(\int $i) {} > > Is it intentional that the \ in front of the "int" is allowed? IMHO, this > confusing notation must not be allowed. This is weird and I'd consider it a bug. You can't do \array or \callable, and if I saw \int, I'd think it meant a class of that name rather than a scalar type. Can this be fixed for 7.0.0? Thanks. -- Andrea Faulds http://ajf.me/