Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92871 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36522 invoked from network); 28 Apr 2016 16:28:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2016 16:28:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 65.55.169.140 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 65.55.169.140 mail-bl2on0140.outbound.protection.outlook.com Received: from [65.55.169.140] ([65.55.169.140:35808] helo=na01-bl2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/91-28296-71A32275 for ; Thu, 28 Apr 2016 12:28:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ckx6vM2R4HcpsL0kgI7qBuKl6a91H9KRE9PlT7g+OQM=; b=KryVRj1M/yQcIrcCaHsXPeaf4x4XtYRpMdWXPLl7hPv1UgSSJUv3tw0KLnt8YvhPACQnPO5DQAZfIVfsTu4uaapJ1/SN8ePYppHVTE3WPFCZ2uxFmPQncPM46UKXlU0R6SM0ETQiFOGfWxBaNsq9evm7KObQG6CUrNN0w2/TfGU= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1782.namprd02.prod.outlook.com (10.163.72.24) with Microsoft SMTP Server (TLS) id 15.1.477.8; Thu, 28 Apr 2016 16:28:03 +0000 Received: from BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) by BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) with mapi id 15.01.0477.012; Thu, 28 Apr 2016 16:28:03 +0000 To: Anatol Belski , Joe Watkins CC: Tom Worster , internals , "Levi Morrison" Thread-Topic: Request to withdraw RFC's for nullable types for only return values Thread-Index: AQHRoWRe782dRDYm1kuNWD0UZVTnlZ+fkd6T Date: Thu, 28 Apr 2016 16:28:03 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: thefsb.org; dkim=none (message not signed) header.d=none;thefsb.org; dmarc=none action=none header.from=zend.com; x-originating-ip: [92.62.57.172] x-ms-office365-filtering-correlation-id: 49799b80-8bb2-444c-52d9-08d36f821297 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1782;5:LDnrddPm1mwEN97ycZqXBobu7+J40orzzeNS6fM4x9MvErFUeX49yw2ddGYABx3eI/9J0WoJASgXotoIoj8m9ED0zneW4o33kBEqDIYDx1OwWMZZQ+o5ta/EDrYH/djXiytEVGlFPVQNjPcIneGZFw==;24:e5eX3vlMPCucCaZk2KeuxrN7XTSC5X1slOui/gbpJ4Q2krB5cUMebzF2ZyVAi/sdCEuhGWtXu6BaO4qr1ImwLFEwSdCsm1k3+YgZZVTXwd0=;7:yy6MV+1L2mTpFNuyCX2gdffnH+W+DEokNoypvUrD93Ky/Z4hWGI2lSY/sCUk+dK/NL5amGQAenJBVLduOV5Y1shhyJ2LYo5+8qtOjTIWGi0HoBzQ1dCHUw9XPquoQ7HlseZf0lQkBPl6ZKGfYQgzCw/f7QCiFPOvS5Kjrr+MmMtcfjWkqBvfSRNYsNwzjESC x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:BY2PR0201MB1782;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; x-forefront-prvs: 0926B0E013 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(5003600100002)(76576001)(102836003)(11100500001)(3846002)(1220700001)(15975445007)(86362001)(77096005)(1096002)(92566002)(6116002)(122556002)(33656002)(16799955002)(50986999)(76176999)(54356999)(586003)(66066001)(2950100001)(10400500002)(74316001)(87936001)(99286002)(5004730100002)(189998001)(2906002)(5002640100001)(5001770100001)(81166005)(2900100001)(3280700002)(4326007)(3900700001)(9686002)(5008740100001)(19580395003)(3660700001)(19580405001)(106116001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1782;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2016 16:28:03.3960 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1782 Subject: Re: Request to withdraw RFC's for nullable types for only return values From: dmitry@zend.com (Dmitry Stogov) Hi, The BC break in PHP-7.0 was introduced by commit ee9a78a033696ff9546fb1dbfe= cd28f20477b511=20 Author: Joe Watkins Date: Mon Mar 28 11:54:25 2016 +0100 Late, there were few more commits that changed and moved the problematic co= de. Anatol, I think we should revert this before 7.0.6 release. Thanks. Dmitry. ________________________________________ From: morrison.levi@gmail.com on behalf of Levi M= orrison Sent: Thursday, April 28, 2016 18:40 To: internals Cc: Dmitry Stogov; Tom Worster Subject: Request to withdraw RFC's for nullable types for only return value= s I have discovered through a [bug report][1] a case where having explicitly nullable parameters would be of value. You can theoretically change the default value in a sub-type, but in this case moving away from the default value of null breaks because the subtype no longer permits null. It is important to realize that we previously *allowed* this behavior since PHP 5.1 but was fixed in 7.0.6. If instead we had nullable types separately from default values of null this could change to: (or a short-form `?array $baz =3D []` if short-form passes) This preserves the ability to be null but changes the default value. Of course, there may be other code changes necessary to future-proof their code but there current code would now work without having to rewrite any method bodies (just signatures). In light of this I kindly request that RFCs that add nullable types for only return values be withdrawn. So that [Union Types][2] and [Nullable Types][3] can go forward unhindered. [1]: https://bugs.php.net/bug.php?id=3D72119 [2]: https://wiki.php.net/rfc/union_types [2]: https://wiki.php.net/rfc/nullable_types