Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110616 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80188 invoked from network); 17 Jun 2020 08:31:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jun 2020 08:31:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AE0671804A8 for ; Wed, 17 Jun 2020 00:17:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS1836 195.49.0.0/17 X-Spam-Virus: No X-Envelope-From: Received: from darkcity.gna.ch (darkcity.gna.ch [195.49.47.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 17 Jun 2020 00:17:34 -0700 (PDT) Received: from flatter2.home (unknown [IPv6:2a02:1205:34fb:29c0:b972:fb31:8bd0:1a89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 4B6C56C0C68; Wed, 17 Jun 2020 09:17:32 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) In-Reply-To: Date: Wed, 17 Jun 2020 09:17:31 +0200 Cc: PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: <8ADA2EC7-EE07-4429-8F84-1E5ADC7660E6@cschneid.com> References: To: Benas IML X-Mailer: Apple Mail (2.3608.80.23.2.2) Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Allow void return type for constructors/destructors From: cschneid@cschneid.com (Christian Schneider) Am 16.06.2020 um 21:30 schrieb Benas IML : > I put the original RFC on hold and created a new PR [0] for implicitly > enforcing `void` rules on both constructors and destructors. Note, = that > this results in a BC break since it is no longer legal to return = non-void > value from constructors/destructors. In other words, it is now illegal = to > return something from ctor. This is a huge BC break as up to now returning something in a = constructor was silently ignored. Therefore I'd strongly advise to go through a deprecation phase = (E_DEPRECATED or E_WARNING) before making it a fatal error so old = software can be fixed first. - Chris