Re: [RFC] Deprecate returning values from __construct() and __destruct()

From: Date: Fri, 29 May 2026 14:01:54 +0000
Subject: Re: [RFC] Deprecate returning values from __construct() and __destruct()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-131056@lists.php.net to get a copy of this message
Hi Am 2026-05-21 10:01, schrieb Mirco Babin:
The RFC should also include "yield". Because "yield" also returns a value. For example: https://3v4l.org/Z4dMTF#v8.5.3
Good catch, thank you. I have adjusted the RFC to mention that making the constructor and destructor a Generator is effectively equivalent to returning a value and thus will also be deprecated. Best regards Tim Düsterhus

« previous php.internals (#131056) next »