Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101411 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16465 invoked from network); 24 Dec 2017 14:35:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Dec 2017 14:35:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.86 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.86 mx105.easyname.com Received: from [77.244.243.86] ([77.244.243.86:53844] helo=mx105.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/D0-21991-11BBF3A5 for ; Sun, 24 Dec 2017 09:34:59 -0500 Received: from cable-81-173-135-181.netcologne.de ([81.173.135.181] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1eT7MW-0006Fm-09 for internals@lists.php.net; Sun, 24 Dec 2017 14:34:49 +0000 Reply-To: internals@lists.php.net To: php-internals Message-ID: <72392123-d37b-26df-6886-218f48205f8a@fleshgrinder.com> Date: Sun, 24 Dec 2017 15:34:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-DNSBL-BARRACUDACENTRAL: YES X-DNSBL-PBLSPAMHAUS: YES X-DNSBL-SPAMRATS: YES Subject: [RFC] [DISCUSSION] Scalar Pseudo-type From: php@fleshgrinder.com (Fleshgrinder) Hi Internals! I prepared a PR to add the `scalar` pseudo-type to PHP after the discussions around adding a `mixed` pseudo-type. I strongly believe that it makes sense to provide the most common primitive union types with handy aliases even if we are going to add union types in the future to PHP. https://github.com/php/php-src/pull/2987 I added support for parameter type covariance and return type contravariance to make it as useful in daily development as possible. I will provide the RFC write-up asap at: https://wiki.php.net/rfc/scalar-pseudo-type -- Richard "Fleshgrinder" Fussenegger