On Mon, Jun 15, 2026 at 7:11 AM Tim Düsterhus <[email protected]> wrote: > > Hi > > I just opened the vote on “Deprecate returning values from __construct() > and __destruct()”. > > RFC: https://wiki.php.net/rfc/deprecate-return-value-from-construct > Discussion: https://news-web.php.net/php.internals/130808 > > There is a single primary vote to cast. Voting closes 2026-06-29 > 14:00:00 UTC. > > Best regards > Tim Düsterhus
Tim, sorry if I missed it in the discussion and RFC: is there any plan to allow declaring `function __construct(): void` at the same time? Since: 1. We are going to actively enforce that they don't return anything, 2. and returning `void` is the correct declaration for such functions (and I would argue `null` as well but I don't care too much about this, I debated mentioning it at all because it's a bit off in the weeds), doesn't it make sense to also allow declaring a void return at the same time?
