Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85187 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20028 invoked from network); 18 Mar 2015 12:47:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2015 12:47:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:49815] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/85-22462-3E379055 for ; Wed, 18 Mar 2015 07:47:32 -0500 Received: by h1123647.serverkompetenz.net (Postfix, from userid 33) id 0083D23D628D; Wed, 18 Mar 2015 13:47:28 +0100 (CET) Received: from 87.159.54.97 (SquirrelMail authenticated user anatol@belski.net) by webmail.klapt.com with HTTP; Wed, 18 Mar 2015 13:47:28 +0100 Message-ID: <1c45330124cc799d5d057f604c11ec92.squirrel@webmail.klapt.com> In-Reply-To: References: Date: Wed, 18 Mar 2015 13:47:28 +0100 To: =?UTF-8?Q?=22Pavel_Kou=C5=99il=22?= Cc: "Pierre Joye" , "PHP internals" , "Anthony Ferrara" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5 From: anatol.php@belski.net ("Anatol Belski") Pavel, On Wed, March 18, 2015 11:05, Pavel Kouřil wrote: > On Wed, Mar 18, 2015 at 11:01 AM, Pierre Joye > wrote: > >> >> On Mar 18, 2015 4:56 PM, "Pavel Kouřil" 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=1); 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=1); 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 >> 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 - but > 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_mode/ 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