Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92278 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93318 invoked from network); 14 Apr 2016 07:59:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2016 07:59:54 -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 157.56.111.103 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.111.103 mail-bn1bbn0103.outbound.protection.outlook.com Received: from [157.56.111.103] ([157.56.111.103:47040] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/92-12455-7FD4F075 for ; Thu, 14 Apr 2016 03:59:52 -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=+3bSH1r5ggIW34lBvTb7AJWuPlpJCV3tV8CZwhHZ0q0=; b=vaAZOD8CCSr2hVAEzTP8+Xu1SraWQSbCfkhGwWZKOh5z5IN4ChOSo4U0Jh5apAfZVZ6jqR3HrBzZG1ndqJ6v9ACXh/2TMwOzhAgOki4WwIQSJF9xUn5nHlvvcPnIu88ozPKIz5eNhqfkSfMg7wMYnLMtHpYyZ+ZdaDTicrQMNDU= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) with Microsoft SMTP Server (TLS) id 15.1.453.26; Thu, 14 Apr 2016 07:59:46 +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.0453.030; Thu, 14 Apr 2016 07:59:46 +0000 To: Levi Morrison , internals Thread-Topic: [PHP-DEV] [RFC] Union Types Thread-Index: AQHRlgBjHidIyU53D0CZRHg5J534aZ+JGcf3 Date: Thu, 14 Apr 2016 07:59:46 +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: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=zend.com; x-originating-ip: [132.245.81.165] x-ms-office365-filtering-correlation-id: d39a5531-9259-491c-5ae1-08d3643abf13 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1784;5:C+cbJJCa5lrgB2eKtXyOHJF01/TaXjHRMCLQMpGyQJnpjkrXAooLDChNodBq98MigqvXct42TfNLJWD6GSEp5SIAo6z3Z0ldEf0YuWtLRvJkcsYYYks5/E7s0wb4yXJlbb48KlX7XUG0mzqjCiZhIw==;24:39/IPD4YtyMa8vVr3ch5Mk2qE7SSUv1iufN8lDqKkRaU3JyG71C43ZXxe1v7nS0GCe7T7f6px3NxZpdc8ydGr/ryoso2VuCfZZpyo2OyTYk= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1784; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:BY2PR0201MB1784;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1784; x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(51414003)(5002640100001)(33656002)(15975445007)(77096005)(2950100001)(5003600100002)(99286002)(11100500001)(5004730100002)(19580405001)(19580395003)(2900100001)(15188155005)(122556002)(5001770100001)(76576001)(16799955002)(189998001)(107886002)(76176999)(50986999)(86362001)(3280700002)(54356999)(2906002)(9686002)(586003)(87936001)(5008740100001)(10400500002)(106116001)(3660700001)(3900700001)(92566002)(66066001)(81166005)(3846002)(6116002)(102836003)(1220700001)(74316001)(1096002)(556834004);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1784;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: 14 Apr 2016 07:59:46.3657 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1784 Subject: Re: [PHP-DEV] [RFC] Union Types From: dmitry@zend.com (Dmitry Stogov) The RFC doesn't say anything about support for multiple class names. function foo(A|B|C $x) Support for multiple classes would lead to complex implementation. Thanks. Dmitry.=20 ________________________________________ From: Levi Morrison Sent: Thursday, April 14, 2016 06:46 To: internals Subject: [PHP-DEV] [RFC] Union Types As alluded to in an earlier email today[1] I am now moving the Union Types RFC[2] to the discussion phase. The short summary of the RFC is that it permits a type declaration to be one of several enumerated types. For example, this is a potential signature for a multi-type map routine: function map(callable $f, Array | Traversable $iterable); The second parameter `$iterable` is required to be of type Array or Traversable - any other type will error. I look forward to a helpful and meaningful discussion! [1]: http://news.php.net/php.internals/92252 [2]: https://wiki.php.net/rfc/union_types -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php