Re: [RFC] Allow void return type variance
| From: | Stanislav Malyshev | Date: | Mon, 04 Feb 2019 17:55:33 +0000 |
| Subject: | Re: [RFC] Allow void return type variance | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-104137@lists.php.net to get a copy of this message | ||
Hi!
> Recent events convinced me to write this RFC :P
>
> Please have a read here
> https://wiki.php.net/rfc/allow-void-variance
>
> I am targeting all the supported PHP versions because this is mainly to
> placate the discontent that arised by PHPUnit enforcing its users to use
> void, so waiting 7.4 doesn't make much sense.
I was never a big fan of void pseudotype, but since it exists, I think
it makes sense to be able to override it. It does not violate the
protocol (since it's impossible in PHP for function to not return a
value, and it's very implausible anybody relies on void function to
return null). And since we have users complaining, it makes sense to fix it.
--
Stas Malyshev
smalyshev@gmail.com