Re: [RFC] Mixed Typehint
| From: | lists@rhsoft.net | Date: | Wed, 20 Dec 2017 13:17:37 +0000 |
| Subject: | Re: [RFC] Mixed Typehint | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101403@lists.php.net to get a copy of this message | ||
Am 20.12.2017 um 13:56 schrieb Sebastian Bergmann:
On 12/19/2017 04:34 AM, Michael Moravec wrote: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 threadI'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