Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101416 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11646 invoked from network); 26 Dec 2017 13:38:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Dec 2017 13:38:46 -0000 Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 188.94.27.5 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 188.94.27.5 scarlet.netpirates.net Received: from [188.94.27.5] ([188.94.27.5:53190] helo=scarlet.netpirates.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/42-58518-2E0524A5 for ; Tue, 26 Dec 2017 08:38:44 -0500 Received: (qmail 28454 invoked by uid 89); 26 Dec 2017 13:38:40 -0000 Received: by simscan 1.4.0 ppid: 28446, pid: 28449, t: 0.0453s scanners: attach: 1.4.0 clamav: 0.99.1/m:/d:20700 Received: from unknown (HELO ?192.168.178.41?) (php@sebastian-bergmann.de@93.226.195.208) by scarlet.netpirates.net with ESMTPA; 26 Dec 2017 13:38:40 -0000 To: internals@lists.php.net References: <72392123-d37b-26df-6886-218f48205f8a@fleshgrinder.com> Reply-To: internals@lists.php.net Message-ID: <5171148a-3554-35a3-ab72-370e1aac4a3f@php.net> Date: Tue, 26 Dec 2017 14:38:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <72392123-d37b-26df-6886-218f48205f8a@fleshgrinder.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Scalar Pseudo-type From: sebastian@php.net (Sebastian Bergmann) Am 24.12.2017 um 15:34 schrieb Fleshgrinder: > 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. Thank you, Richard, for working on this. I spent a lot of time this year introducing scalar type declarations into existing code bases. In quite a few cases I was not able to do so because the existing code works with parameters that can be of two or more scalar types. With PHP 7.2, I can only document this outside of the code using @param annotations (until the code has been refactored to work with only one parameter type). With a "scalar" type declaration I would not have to fall back to @param annotations and could express the type in actual syntax.