Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80448 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57245 invoked from network); 14 Jan 2015 09:18:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jan 2015 09:18:10 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.47 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.218.47 mail-oi0-f47.google.com Received: from [209.85.218.47] ([209.85.218.47:51654] helo=mail-oi0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/E1-43840-15436B45 for ; Wed, 14 Jan 2015 04:18:09 -0500 Received: by mail-oi0-f47.google.com with SMTP id z81so6464382oif.6 for ; Wed, 14 Jan 2015 01:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=3w72Y22VskCF83COcJ9rd53EDRxwpyPbd6rOaYJw780=; b=kNRfSRgfTV5Wl84TxH5Mq4KQVHAmSfo4gCSp8TXx95NI6RZXjwwrxFDs2d7ixN5XYp 4uqgsYpvuORqaQDbXrJuI0CM8ji20P7+BuuxQ8NoYwQVMqWwtCsg3Z7jR9r4INtZLdsm cZy21+R/bjPphALC8FWShQoGcq6Msu1LPkyXKTV0XN0Gp1WIjweE++zCmTKGtQMerjPt U2XpQxHr4k5PEriqVtxsb85t+Ry9z7QlaEgtHNOVFdGU32Tdb6pkppcACBe1lxQiFQx8 yrShj57d3rmSNo9Nn1Zq+LvUUrw0RdqsnuwIVMF9CEpwrc1tf/Ct12kksZ0k36mr96yV CGmQ== MIME-Version: 1.0 X-Received: by 10.202.84.147 with SMTP id i141mr1706629oib.56.1421227086222; Wed, 14 Jan 2015 01:18:06 -0800 (PST) Sender: morrison.levi@gmail.com Received: by 10.76.103.101 with HTTP; Wed, 14 Jan 2015 01:18:06 -0800 (PST) Date: Wed, 14 Jan 2015 02:18:06 -0700 X-Google-Sender-Auth: lRtJe0gzkC_MYS6v0GvAhFhZ_v4 Message-ID: To: internals Content-Type: text/plain; charset=UTF-8 Subject: [RFC][Vote] Return Types From: levim@php.net (Levi Morrison) Dear Internals, I have moved the Return Types RFC[1] into voting phase. A few changes have happened since it was originally announced but have been covered by discussion. Return types are now invariant. This means a sub-type must declare the same return type as its super-type's method when overriding it. Aliases such as self and parent must resolve to the same type. Also note that picking invariance now does not mean we can't support covariance later. This decision was a trade-off of my time and the projected timeline for PHP 7. I was not confident I could produce an excellent design and implementation in time for PHP 7 if I chose covariance instead. There is no reflection support for return types; another RFC[2] will handle this. Dmitry updated a sizeable chunk of the implementation[3] to work on much more recent master branch. Thanks, Dmitry. I have updated it to work on the latest master version as of the time of this writing and altered one or two things to bring it into line with the RFC. The voting period will end during the evening of 2015-01-23 in UTC-7. This period is around ten days, which I hope is enough time for everyone to be able to vote. [1]: https://wiki.php.net/rfc/return_types#vote [2]: https://wiki.php.net/rfc/reflectionparameter.typehint [3]: https://github.com/php/php-src/pull/997