Re: [RFC] [DISCUSSION] Allow void return type for constructors/destructors
| From: | Benas IML | Date: | Wed, 17 Jun 2020 22:15:00 +0000 |
| Subject: | Re: [RFC] [DISCUSSION] Allow void return type for constructors/destructors | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110638@lists.php.net to get a copy of this message | ||
Just a heads up :)
Both PR and the RFC were updated to reflect the changes and to minimize the
amount of BC breaks.
TL;DR the RFC proposes to deprecate returning non-void values from
constructors/destructors in PHP 8.0 and always enforce void rules on
constructors/destructors in PHP 9.0. Additionally, to allow declaring an
explicit
: void return type on constructors/destructors.
Best regards,
Benas
On Tue, 16 Jun 2020 at 03:34, Benas IML <benas.molis.iml@gmail.com> wrote:
>
> Hey internals,
>
> I am proposing to allow void return type for constructors/destructors. Note,
> that this is an **optional** and cosmetic-only addition! All of the reasoning
> is in the RFC.
>
> RFC: https://wiki.php.net/rfc/constructor_return_type
>
> Best regards,
> Benas