Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82116 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12026 invoked from network); 8 Feb 2015 05:40:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Feb 2015 05:40:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:36849] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/96-07765-7D6F6D45 for ; Sun, 08 Feb 2015 00:40:40 -0500 Received: by mail-qc0-f170.google.com with SMTP id i8so4069098qcq.1 for ; Sat, 07 Feb 2015 21:40:37 -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=eFqs2tbRvip1rMpU+tEUQfJs0Y/ayJQ2QvmxRnmHJnk=; b=z0hUu9cE7v77XBOw6SIXfVPdeicPu3/n5dBIAi0ozIbpsKbOCWeFiMYNMBR/HQJcvU oshIXcyj+MkMzXKOl6qU03KE6rdxr+p+lTbBoheuCSSXfy5z/k8hyaP4HYCg+YQwKT+O usgRXxGuj7D9v3E3bXqnRmtD5UaNKnqkmwzZDQJ8zFOiMtIsc14of51GqqbZvgA5feUc MuSTgznAd73OUlL2ZDGaBaRt9MOaDb2qhQFMhyoP1TPS9X00bmcTW+ht5bmekFan8M1X gSFP8lI6MtACwWxRCq1u8WP1uhz/YphNfaTThPgZD1onoVbLDAeHmaxr5Y946ghHolaB 4tow== MIME-Version: 1.0 X-Received: by 10.229.65.133 with SMTP id j5mr12127143qci.27.1423374036941; Sat, 07 Feb 2015 21:40:36 -0800 (PST) Received: by 10.96.185.37 with HTTP; Sat, 7 Feb 2015 21:40:36 -0800 (PST) In-Reply-To: References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> <9E1C2427-0295-4F3E-BD29-04DA84321067@ajf.me> <54D6CC39.50708@lerdorf.com> <93AAEA55-1C03-46AD-88D0-6A2F5531FCA6@ajf.me> <54D6DD7E.5060602@lerdorf.com> Date: Sun, 8 Feb 2015 12:40:36 +0700 Message-ID: To: Rasmus Lerdorf Cc: PHP internals , Andrea Faulds , =?UTF-8?Q?Pavel_Kou=C5=99il?= Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: pierre.php@gmail.com (Pierre Joye) On Sun, Feb 8, 2015 at 11:33 AM, Pierre Joye wrote: >> > Yes, the RFC is somewhat inaccurate in that respect. It is per-file in >> > one sense (like encoding, but unlike ticks, it has no effect on the >> > including or included files). However, it technically affects the remainder >> > of the file, not the whole file. >> >> Well, no, not the remainder of the file either since it can be switched >> again. It only affects the part of the file between declares if there is >> a second one. > > For this specific weirdness it should really be fixed somehow, like for > namespace. It has to be used at the top of a file. As it is a compile time > thing, the extra check should not have much impact. and it was also not correct that we never used declare for such things. http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_compile.c#3776 about encoding. And it has to get this exact kind of check for the exact same reasons. In other words, we can use the same solution. -- Pierre @pierrejoye | http://www.libgd.org