Re: [RFC] Mixed Typehint
| From: | Andreas Hennings | Date: | Fri, 22 Dec 2017 23:37:03 +0000 |
| Subject: | Re: [RFC] Mixed Typehint | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101409@lists.php.net to get a copy of this message | ||
> 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.
Why would this be an either/or?
I don't mind a "scalar" type hint. But this could be a separate
discussion, and is not in conflict with "mixed".
On 20 December 2017 at 13:56, Sebastian Bergmann <sebastian@php.net> wrote:
> 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.
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>