Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85178 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96485 invoked from network); 18 Mar 2015 10:05:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2015 10:05:41 -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.216.171 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.216.171 mail-qc0-f171.google.com Received: from [209.85.216.171] ([209.85.216.171:35010] helo=mail-qc0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/71-22462-5FD49055 for ; Wed, 18 Mar 2015 05:05:41 -0500 Received: by qcbkw5 with SMTP id kw5so33171930qcb.2 for ; Wed, 18 Mar 2015 03:05:38 -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=1Q9XCGzbVfivWaUzhJNOF5QrfvG5QmvyF/5xGMKyMew=; b=Rwjy8ecsZ+jiXN6ddH5EiS7XF9XrtNy0UsbZzkgPK9C9emKDp3DQETtoFZ0OnrGQAM xE7V5gqJ+AV+of025CgHJ6KnIpShjor5mNyHluJ8uQiaEcvdyNCq1jtI0T6oDcmN+LvK /HS03jNe25iq6Mbbt/q60biYbY19PGO/azrq0L1hWL0WVBfUBehi4+jssb9EZ8EJUIKB HdrzkEGWYmxiPHVjAcWk2RUmED6vUXP0UYUSM8xHfuN+Rl06Yoe6//w0Pp7Ban2fZNAt jDHPfv2aZxvJV1SwWtGfp3rXDs9riad/5uZCl2adNBUhHNiH0WXIApH06a/NyGmrohsS kTHw== MIME-Version: 1.0 X-Received: by 10.140.96.165 with SMTP id k34mr84665547qge.79.1426673138239; Wed, 18 Mar 2015 03:05:38 -0700 (PDT) Received: by 10.96.160.99 with HTTP; Wed, 18 Mar 2015 03:05:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 18 Mar 2015 11:05:38 +0100 Message-ID: To: Pierre Joye Cc: 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 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) { return $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 questi= ons > (in various form but it ends to the same answer). > > And the patch should be applied sooner rather than later. So we can fix b= ugs > 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 - but I don't. I wanted to try it myself via http://3v4l.org/, but it unfortunately doesn't support multiple files. Regards Pavel Kouril