Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86618 invoked from network); 8 Feb 2015 02:55:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Feb 2015 02:55:24 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.208 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.208 imap2-3.ox.privateemail.com Received: from [192.64.116.208] ([192.64.116.208:49326] helo=imap2-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/82-07765-B10D6D45 for ; Sat, 07 Feb 2015 21:55:23 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 4B1B28C007D; Sat, 7 Feb 2015 21:55:20 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 53hx7euDhGBI; Sat, 7 Feb 2015 21:55:20 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 625DE8C0075; Sat, 7 Feb 2015 21:55:19 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: <93AAEA55-1C03-46AD-88D0-6A2F5531FCA6@ajf.me> Date: Sun, 8 Feb 2015 02:55:16 +0000 Cc: =?utf-8?Q?Pavel_Kou=C5=99il?= , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: 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> To: Rasmus Lerdorf X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hi, > On 8 Feb 2015, at 02:51, Andrea Faulds wrote: >=20 > 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. A minor follow-up: the RFC does actually mention this specific point = about declare()=E2=80=99s behaviour: > By default, all PHP files are in weak type-checking mode. A new = declare() directive is added, strict_types, which takes either 1 or 0. = If 1, strict type-checking mode is used for function calls and return = statements in the remainder of the file. If 0, weak type-checking mode = is used. >=20 > This directive also supports the declare() block syntax (e.g. = declare(strict_types=3D1) { foo(); }), in which case it will only affect = function calls and return statements within the block. -- Andrea Faulds http://ajf.me/