Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130104 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 4852E1A00BC for ; Fri, 20 Feb 2026 11:35:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771587325; bh=lMMdQP46tOK22LEyhc6ndjgQ53DaPJR7uRZdBkCXhDQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=frhR8ZtxasawPyVs9Ji1skOND/HaeLLGx/eHYlmIHgxji5Og2AhDzPXVV9vTxLD68 vaZ0niDx3hD3EnHpRC/4CliofQEyO1QAgvmkcRIsIE2qM4DqCr2ln4mOkIU+LHFfHo QYwyqAj8ydxqESIhP2WDuEJ0YXSwPCOPpgJi62RC3fRu5ffi5LYG/hRuV8TindYIW1 5KPkyz8EJDkscGv39SY6QiQSnQBIZHVOlRCH3O0DUJiatOFVohyBmLXwJdRxGhWHJg jVgh63kzSgicW1miOCFoGScEcluwBZa1hVnsuMkrN/Anylwo61eqcDXVzBml2GKOjK QgoF5OMSyIEtA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 049F4180077 for ; Fri, 20 Feb 2026 11:35:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 20 Feb 2026 11:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1771587313; bh=KIh+i+Zc5LMc/Hc2kdUC6SQ0VeQLaXwL6DzV53j+b9U=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=Xhf37XlGr+NZWZZdCISnSleL5odlKJuoovUmU5eZ+s+yBbC9a+D9flV1/qOAT85+2 NbFcIVI1mxgjo7EXRILYZrmsBpnS052o0EnLKSBNoe9wr24HhmVEzu/r2HLl+PQZBQ 2pOY/t+2aDdGthtYmMs/ZNeDhPgRUEeMrR3FtFoULwpDpClI677vYxN30T0U6Iq06A cqjxnVyTyA+tBSakfCk8/Dtr8u++ZsipD2yIg6D4xfuLou5PYHQd3qUVOIU/biYEwY bYPMgW6XtpXv6V7bQsW+n7WFlBHi8oNQOfQGL4Z3/EUBN8H8wmA9wIDbzKITYNREKL 1C25y0v814H6w== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 20 Feb 2026 12:35:12 +0100 To: Mirco Babin Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [IDEA for RFC] let the "new" operator fail when the __construct() function returns a value. In-Reply-To: References: <0ece40da-762a-4190-9cc8-23ff432fd441@bastelstu.be> Message-ID: <565970ab3a667958c340a9094d53357b@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2026-02-14 15:00, schrieb Mirco Babin: > This argument has convinced me. And writing it down helps clear my > mind. Great, thank you! >> All that said: If you are willing prepare an initial RFC Draft based >> on >> the official RFC template (https://wiki.php.net/rfc/template) and to >> go >> through the process of officially discussion the RFC, I'm happy to do >> the “polishing” work as an official coauthor / mentor to make sure >> there >> are no missing bits or other mistakes. I'm also willing to get someone >> to do the implementation (potentially I'm doing it myself). >> >> Do we have a deal? :-) > > I have prepared a RFC at > https://gist.github.com/MircoBabin/aaa574297c8d1baa879f19c99ce28e93 > > Are you still willing to carry out the implementation? If so: Yes, I'm still willing to help out with the implementation (or to find someone to to the implementation if the RFC passes). > - Should I mention you as coauthor? For the “only warn on new at runtime” variant, I personally don't agree with the proposal and thus don't want to officially co-author it. But I'm nevertheless willing to help with the implementation and with feedback to ensure that the RFC is in the best possible shape policy-wise. As previously mentioned, I believe it should consistently warn at compile-time and not make a difference between “using new” and “calling __construct() manually”. > - In the first chapter, what wording should "Implementation" be? > - What wording should "Patches and Tests" be? It's okay to leave that out for now in both cases. An implementation is not necessary to vote on the RFC and it can be filled in later. The next step would be registering a Wiki account at https://wiki.php.net/rfc?do=register and then request RFC karma, so you can create a proper RFC page and “officially” start the discussion. Having the page will also make the RFC text much more convenient to read compared to the Gist. I've taken a quick look at the text and “format-wise” it seems to contain all the necessary information. Great work! Best regards Tim Düsterhus