Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85189 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22564 invoked from network); 18 Mar 2015 12:53:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2015 12:53:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.48 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.192.48 mail-qg0-f48.google.com Received: from [209.85.192.48] ([209.85.192.48:33025] helo=mail-qg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/16-22462-D2579055 for ; Wed, 18 Mar 2015 07:53:02 -0500 Received: by qgfa8 with SMTP id a8so35282117qgf.0 for ; Wed, 18 Mar 2015 05:52:58 -0700 (PDT) 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:content-transfer-encoding; bh=jvBGxHaxMjUwFaAFde9HIiwmv+OP8WPFkLFhdyn70gc=; b=iv/nJYLsTq1Nu5hFf5RH9BZPKJcClAXAwr37oXr+rj+udIYsgp0B6m4CVeUpjDXI8i XQYCVmQweu7l+R8aWS6XFxiWYmVftRD1ODz1o5sfzDO2hNcUSvRMU+J3MMYWR2HKDthQ ElYNkq+SroIC1fn4wQpMb7yArVO1jM8V9uMUwAnncaG5YoGStXWDxJmgFgBI7ALqrQNr ZLct3+bO77X8wWQpJrKfh7iEUYQdNcGyxcIMMRv5OlwVw9qIBxg2CHXc5gHjAYditIch a0/0zerMYxTCE3gxMyMb/TdIVWBPZ9xUWzIiC7NEUHL4tdeBOJ4UhBq6V1gVkVdfA/tT 6lCA== MIME-Version: 1.0 X-Received: by 10.140.237.14 with SMTP id i14mr40157550qhc.0.1426683178699; Wed, 18 Mar 2015 05:52:58 -0700 (PDT) Received: by 10.96.160.99 with HTTP; Wed, 18 Mar 2015 05:52:58 -0700 (PDT) In-Reply-To: <1c45330124cc799d5d057f604c11ec92.squirrel@webmail.klapt.com> References: <1c45330124cc799d5d057f604c11ec92.squirrel@webmail.klapt.com> Date: Wed, 18 Mar 2015 13:52:58 +0100 Message-ID: To: Anatol Belski Cc: Pierre Joye , PHP internals , Anthony Ferrara Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5 From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) On Wed, Mar 18, 2015 at 1:47 PM, Anatol Belski wrot= e: > Pavel, > > On Wed, March 18, 2015 11:05, Pavel Kou=C5=99il wrote: >> On Wed, Mar 18, 2015 at 11:01 AM, Pierre Joye >> wrote: >> >>> >>> On Mar 18, 2015 4:56 PM, "Pavel Kou=C5=99il" wrote= : >>> >>>> >>>> On Mon, Mar 16, 2015 at 10:03 PM, Anthony Ferrara >>>> >>>> wrote: >>>> >>>>> All, >>>>> >>>>> >>>>> Voting has been closed on the scalar type declarations v0.5 RFC: >>>>> >>>>> >>>>> https://wiki.php.net/rfc/scalar_type_hints_v5 >>>>> >>>>> >>>>> At a final score of 108:48, it has been accepted for PHP 7. >>>>> >>>>> >>>>> Thank you. >>>>> >>>>> >>>>> Anthony >>>>> >>>>> >>>>> -- >>>>> PHP Internals - PHP Runtime Development Mailing List >>>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>>> >>>>> >>>> >>>> Hello, >>>> >>>> >>>> how will these examples work btw? >>>> >>>> // a.php >>>> >>> declare(strict_types=3D1); function foo($fn) { $fn("1"); >>>> }; >>>> >>>> >>>> // b.php >>>> >>> require 'a.php'; foo(function (int $a) { return $a * 2; }); >>>> >>>> >>>> >>>> // c.php >>>> >>> function foo($fn) { $fn("1"); >>>> }; >>>> >>>> >>>> // d.php >>>> >>> declare(strict_types=3D1); require 'c.php'; foo(function (int $a) { re= turn >>>> $a * 2; }); >>>> >>>> >>>> I can't find this in the RFC. I'd intuitively expect error in the >>>> first example and the second one to work OK. >>>> >>>> But at the same time, if there will be an error in the first example, >>>> it is IMHO a huge flaw with this RFC. :/ >>> >>> Git clone, compile, try, report. >>> >>> >>> It sounds pretty straight forward to me instead of asking the same >>> questions (in various form but it ends to the same answer). >>> >>> >>> And the patch should be applied sooner rather than later. So we can fix >>> bugs if there are actual ones in the current implementation. >> >> Hello, >> >> >> if I had time to set up the compilation of PHP on Windows, I'd do it - b= ut >> I don't. I wanted to try it myself via http://3v4l.org/, but it >> unfortunately doesn't support multiple files. >> > > for anyone needing to test on Windows, there was builds for an older RFC > version > > http://windows.php.net/downloads/snaps/ostc/scalar_type_hints_2_strict_mo= de/ > > but I just made quick builds for the current as well > > http://windows.php.net/downloads/snaps/ostc/scalar_type_hints_v5/ > > So you've got the choice. > > Cheers > > Anatol > Hello, thanks a lot, I'll play with it this evening. :) Regards Pavel Kouril