Re: Mixed type-hint
| From: | Girgias | Date: | Fri, 08 Feb 2019 12:26:07 +0000 |
| Subject: | Re: Mixed type-hint | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-104313@lists.php.net to get a copy of this message | ||
On Fri, 8 Feb 2019 at 13:13, Robert Korulczyk <robert@korulczyk.pl> wrote:
> Sounds like an arbitrary interpretation. Treating `?mixed" as "top type"
> (including null) would be more practical and consistent with other
> type-hints.
>
> Regards,
> Robert Korulczyk
>
The whole PHP Documentation is based around the fact that
mixed includes
null, would it make more "sense" that null is not included,
probably,
also even if I do like the proposal it seems this is just to add a
type-hint so you can *mostly* type hint all function.
But in this regards I would prefer that the scalar RFC type hint goes back
into discussion as it has potentially more use case IMHO.
Best regards
George P. Banyard