Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101403 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3025 invoked from network); 20 Dec 2017 13:17:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Dec 2017 13:17:42 -0000 Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:54135] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/FA-10479-5F26A3A5 for ; Wed, 20 Dec 2017 08:17:42 -0500 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3z1wL96HnMzXMZ for ; Wed, 20 Dec 2017 14:17:37 +0100 (CET) To: internals@lists.php.net References: Message-ID: <21f74b9e-dc70-f820-2bff-4348a5855854@rhsoft.net> Date: Wed, 20 Dec 2017 14:17:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Mixed Typehint From: lists@rhsoft.net ("lists@rhsoft.net") Am 20.12.2017 um 13:56 schrieb Sebastian Bergmann: > On 12/19/2017 04:34 AM, Michael Moravec wrote: >> I'd like to propose and discuss Mixed Typehint RFC for PHP 7.3: >> https://wiki.php.net/rfc/mixed-typehint > > "mixed" is too unspecific. I understand the reasoning behind wanting > "mixed": to express explicitly that a type declaration was not forgotten. > > I think that a "scalar" type that "groups together" bool, float, int, > and string would make more sense. This would allow the expression that > something is not an array, not an object, and not a resource no - 'mixed' is for the same thing you have a comment "@param mixed $var" and that contains by definition array, object and resource when your method accepts any type and handles internally what to do with them what you are talking about are unions statet multiple times in this thread