Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85177 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94857 invoked from network); 18 Mar 2015 10:01:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2015 10:01:42 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.178 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.178 mail-qc0-f178.google.com Received: from [209.85.216.178] ([209.85.216.178:34412] helo=mail-qc0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/21-22462-40D49055 for ; Wed, 18 Mar 2015 05:01:40 -0500 Received: by qcaz10 with SMTP id z10so33145732qca.1 for ; Wed, 18 Mar 2015 03:01:37 -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; bh=NfE22a21rID0aJm+2RUlatVKXSDo/bqlQSnXMvE2AcM=; b=a69M5kvAX1WyK1QSvXq2BRl2tjEJ9yz5DNAWXcAgV55G8XFU2fR9gvIxUJ19uQF6mR iFjP8f0iS0qUqK+2eEToCXAn6TDHatXmosz8AKEBCqv1Yvw0qXHKk28sXcDnYKIoSt9i TBcG5VHaZUO3sJ+IHWgSqUQ0CACmIwM7GVRsHUsusV6Xy/X1AZPsK5O4bDDkz/mdbIk8 2GVh2BMw1yRJw8MokkggzB6WBlz/Pa8MOZTrQ1Rnf2/71ScglMqJnqZ+pOucr6I0aP1a XQrCqLfAKaNUbHaUxOd8t/3cdj3aa2bD80NDvYD8rhBg2HjaSMWDu28Ddr4idxzSxVWB kDNw== MIME-Version: 1.0 X-Received: by 10.55.19.159 with SMTP id 31mr95516055qkt.24.1426672897209; Wed, 18 Mar 2015 03:01:37 -0700 (PDT) Received: by 10.96.39.195 with HTTP; Wed, 18 Mar 2015 03:01:35 -0700 (PDT) Received: by 10.96.39.195 with HTTP; Wed, 18 Mar 2015 03:01:35 -0700 (PDT) In-Reply-To: References: Date: Wed, 18 Mar 2015 21:01:35 +1100 Message-ID: To: =?UTF-8?Q?Pavel_Kou=C5=99il?= Cc: PHP internals , Anthony Ferrara Content-Type: multipart/alternative; boundary=001a113ffb463fb94105118d2b5b Subject: Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5 From: pierre.php@gmail.com (Pierre Joye) --001a113ffb463fb94105118d2b5b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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. --001a113ffb463fb94105118d2b5b--