On Mon, Jun 2, 2025, at 18:27, Gina P. Banyard wrote:
> Hello internals,
>
> This is the second RFC out of a set of type system related RFCs I want to propose for PHP 8.5.
>
> The objective is to fix a weird quirk of PHP's type system, where void lives in its own
> type hierarchy.
> This is visible mainly in that a lack of return type is not isomorphic to a function that has a
> return type of mixed.
>
> Let me know what you think about it.
>
> RFC: https://wiki.php.net/rfc/void-as-null
>
> Best regards,
>
> Gina P. Banyard
>
Hi Gina,
This RFC feels inverted to me. Instead of making null equivalent to void, why not make using a void
return an error (eventually) instead of it returning null?
— Rob