Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82234 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64131 invoked from network); 9 Feb 2015 08:04:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2015 08:04:15 -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.45 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.45 mail-qa0-f45.google.com Received: from [209.85.216.45] ([209.85.216.45:47544] helo=mail-qa0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/72-50460-DF968D45 for ; Mon, 09 Feb 2015 03:04:14 -0500 Received: by mail-qa0-f45.google.com with SMTP id n8so19893139qaq.4 for ; Mon, 09 Feb 2015 00:04:09 -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=Fp94hfMRss/rflFJ8lXiYoqyQd9niOTu8LgqG690TsQ=; b=IQCVtCALDez7Lpl+JG2iXajpHoZ4hiavVJ8eZ0a6fv7JcqzsVVkZ4JyuBTbjU+rmCB PBe220IwS9TTx7PWqQBOtGd9vYU0rYfJ4Z234kK0J35hygrygsk10qW5ewkDvz3DW6cF EERT8nsGv8gJZBPoU0X4s9X1vOONUs6jc2+XFpHVVS/Qd6Fm5YRLUFiZ6oGNXEltyUr2 Itf3lNu5bzPOskF5XgPufclEEcjQs31XShV22ETzq0UmvPLiaH6cyFE8k3RHTZwdvZBm cqQuRAFKEyPPmmEwRk6sTqyFrNF7rwPULakRQIVWKkWcjoEMEwZUW7Wr+/P8STiqNE9v ycJg== MIME-Version: 1.0 X-Received: by 10.224.38.70 with SMTP id a6mr10159156qae.15.1423469049220; Mon, 09 Feb 2015 00:04:09 -0800 (PST) Received: by 10.96.185.37 with HTTP; Mon, 9 Feb 2015 00:04:09 -0800 (PST) In-Reply-To: References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> <54D5659D.5000602@php.net> <54D7A6DB.3050209@seld.be> <74136F1E-817F-4A33-8228-B47045DD65C3@ajf.me> <54D7EB44.9010005@gmail.com> Date: Mon, 9 Feb 2015 15:04:09 +0700 Message-ID: To: Arvids Godjuks Cc: Andrea Faulds , Zeev Suraski , Stanislav Malyshev , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: pierre.php@gmail.com (Pierre Joye) On Mon, Feb 9, 2015 at 3:02 PM, Arvids Godjuks wrote: > I actually have a question, that Ferenc touched on, but it never got any > discussion. > > How, actually, the declare will work with concatenated PHP files? It's > quite a common practice to put the files into packages, that require > minimal amounts of includes for performance reasons. > Declare is required to be a the top of a file as a first statement. So, if > I have like 10 packages from composer written in different styles, how > should I actually combine them? Stripping the declare from each file and > putting a single declare with the type hint level I want? What will happen > if a library is written for weak type hints ends up in strict type hint > mode? Or the other way around? Isn't it gonna be a mess? How do you do it for namespaces? This is the same issue. Cheers, -- Pierre @pierrejoye | http://www.libgd.org