Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110638 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 6266 invoked from network); 17 Jun 2020 23:29:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jun 2020 23:29:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2FAE918054E for ; Wed, 17 Jun 2020 15:15:17 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 17 Jun 2020 15:15:16 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id w15so2253793lfe.11 for ; Wed, 17 Jun 2020 15:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=t6124J0nf5cFbObcPaClou2kTvUCkzJV8TmPO4WMMm4=; b=AqzrdiGKZ1QKe+tAxNo4SGUZ5q30EsA6kHVnzgxTpjj5KZgbyeg2ZugwE+1cPJV9SW +82R7alx4k5jVJytuWTg1fQo9j/8VGK3J0jC3nT3A3UJLYb68diWhHdIb+NvGy4tl3xh O/APKRMfiXt6JlCCZV3JbIlp5ji4uBtZLRGfPnFqedr8c7kwWVZFzXaAtcYuoY1Ip/U1 FwemEgLDSKxGpAq60grKdo0/cjLSln/NtWMZdXGw5hkFe6P1CKBKuH+GWfwumWI13//O /cn1lO82Z6jdZb34FHsjDzStc6PePjAsvZImUoVdhpiM+AqNgYWGlBwIzKvQrv0vHXNp 3iUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=t6124J0nf5cFbObcPaClou2kTvUCkzJV8TmPO4WMMm4=; b=it5bQjcCCQ7CC+h5UZuso1ncRGQOLbUIZqH5vQrW/xRDo6P375yndfGNqijKdhIQ9T xnYup1gAXn3+APAhgjD8JFYbhAFx26zYgdFUdEYRm+6bCNCIPmKqOhC446zocaUAbrHE ozAyPnf1XGp/iU/eOPEC1uHJOdRGIBQYpHEjmxz3eeseRPIKkZhYpeKBKJi8YMjVwBLb L/qUSZNr0qCcL6plOP4kBR6Ruh7OsAfmNCcXsl1645ZYXvUesXMjrfRU9jxgeuObK/IH kDVtD1GyLlLkGV26l65+GyJaKcucWr+Qk/ck2hwGW7zVeXwfU+B8nq5XqAvDU+Vw07s/ XNuQ== X-Gm-Message-State: AOAM533p4sWO2yn/4kHCMFqX3k3e0rA0hPM0E7owfFPwnOM2XjHkyuNR JkasbcGKlFtLy8iM88aCQx+1aaAXs0y4+DOn6zwzyNfi X-Google-Smtp-Source: ABdhPJzEIRQgyUTEw7oDTI6MML18m3vGST8Rmb7LoJvjMryWp7ixTzmzNbWt87qOFq6FFaxW+bUT7UsD1THGWXZdIko= X-Received: by 2002:a19:5f54:: with SMTP id a20mr580532lfj.28.1592432113383; Wed, 17 Jun 2020 15:15:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 18 Jun 2020 01:15:00 +0300 Message-ID: To: PHP Internals List Content-Type: text/plain; charset="UTF-8" Subject: Re: [RFC] [DISCUSSION] Allow void return type for constructors/destructors From: benas.molis.iml@gmail.com (Benas IML) 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 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