Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130085 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 335B51A00BC for ; Tue, 17 Feb 2026 16:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771344294; bh=j/9xK/xyWSy9S9SCdOF/j6eRK7Jb6ju2SHIP+3+d5Ig=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=M2/hpY/QTQ5Y5Nkml8mzMRKQBoh5zeMZlhWgMD5G9c5XEnQhAZbL1MVI+RE4PIDTq QIQ6VNamfOlH39pOIWXcjJaexHw2IADJ0ocB2y1CiA0B54i5WcoCWbXXETN7RjHWqT YL8y3A+iDWvk7DW3AgtFixKN13D/mZJkImSvid8DFusjO7YQUGNT+sO/inkpA7wdQY CEeVyyvURBCQl+QO6L5OyVp8cVODQz2WkKD4HTYwOB15s/lef4zJlTIxTkc4lIuX31 Y1T/9phGHcjQRJqT+QJndMphNZ9+oXh41g4hwVsP8IZLBnqLdsg02Uo0KIW+UyjbYy FNcUbkGMPzPVA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1F1F4180072 for ; Tue, 17 Feb 2026 16:04:54 +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=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (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 ; Tue, 17 Feb 2026 16:04:53 +0000 (UTC) Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-46392972257so2856463b6e.2 for ; Tue, 17 Feb 2026 08:04:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771344288; cv=none; d=google.com; s=arc-20240605; b=KHj1YetXP7LdyDRP1qnFhjyyNhYZacBl8Vc/OUdu4I8eO8IFL7H9fH3mUUoAWewDLP AG2oTV99Ra5CNdUa3+PHfWdHzHr6JANDmnH8106PUOkhLH6StXXriKP1waB0SmNJK5IO E0EKiGkp5O+1nLkHpKgNAG3+XT4htwNeP5Q3GgXd+tgw9rUaHhr8WDSicFf5mHUvRpIZ 428oC3MnH2lBL/Znkyef6IKgUFV63wFF/XBd9GI/Xk+aeypppyWhbWLeT8DmFD2GvLdi nTofA31+bV+VGaOZ5faCB5AAfi2RR0SXTg9ZBpS5BEprKkfl3eSAvy3emb1HU2+y5288 izLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=jKSAT+RTDGXHjWATn7OzoJL98YZmDN/dWzrMv+o4evg=; fh=pg/1bgysRXOSlnXncgIWGWssOpMqPC8ILuppXr5ZRUY=; b=bftzmdvWW6ztMjVyIUSfSFCLznF47TZNTfW2o33+6ANNCs3djKWjc1yzkY6CbLbaY6 +7n8FCXUnWcYXsfaQqRjPQi1Eo4npKA6KvCEvQ1P7ZPUNVjbNtzJ6ATP3u109xoVdfT5 thuO51u06P6mXXNoBCoofJKshRrjZVBWTW72riGbg6Whp6QskbDGItJd46lddQvX97l0 XO0fuKEdBbI+6NZvon9gyPO29gzLeTRUB1bVb5Dtym8N1nStdE1ilwpfJYvugfYxlyrH gyhsrAtkEEqwEgAsK2t6m1vCNts2DEjEm71kqZ+tENOIZp2WYe9auufnKi6C3GTESTKK +/xw==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771344288; x=1771949088; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jKSAT+RTDGXHjWATn7OzoJL98YZmDN/dWzrMv+o4evg=; b=NI9fsMxotIn6RMgGPkMqA/rG0yUYrPMiJnXUfp5Ngt+9n/YrPpMP32MDEv/W/BlVJF BGw7/OPtCNBN6xFaBHvx/Mu2SrDn80X6PTIsQxqH9OVB3DBpu7etmSl5hxi2qJod3nzl ewlD0+RRTdvNj+ygyESVS6VyQFQtT5o9TcjVpiRVgCQF4p8gv4Yfgi6BEAMcyvC2lSwo NorOq/31D6csRYsoN85IBlY6MOgI2+SRIZ+m88vVRuKPAqIZm0CGa15walJNMk7lVbt/ 2a6gwVWWtSfLrJ2SiOI6V7RVoDq/XE9an6UJPvQ2qDjxNjAY/0qtbyQP2DdoR7SeXHtz ffIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771344288; x=1771949088; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jKSAT+RTDGXHjWATn7OzoJL98YZmDN/dWzrMv+o4evg=; b=VNBnqLeMxbOiLV64TEVqp2HM0Pwnds3BeWZ/W3gkYs/cRL60e1h5SEK+g/jjGxp608 0o+6g20u3TjSXU9D3Ddp/8Ggg/ub6t8QOJRB8CiRpFkZlVYLGhVmP1YQsOOr6eKxMWr8 Usis68f2raWbuyfL1A/KkXvgQp4vtrITCmSQHDJCEoKwNIi6YZCqkUJtqxToq+Ln+aCo 9wZcPqMTVlMx2QxHzj5yaYRCAV1JAFHcW3SmOUHzjzBNMM13XLWaFWhVSsaDGRtIkTkU GZTOArixSRbYsO4vbhIjpn1vdX5djvTjHHl1kC/lYKmq8XPFSvAwaoGUaG70xoygeI7f n0Fg== X-Gm-Message-State: AOJu0Ywg/G6EcHraezcsWPyOIt9JfLU1kY0fZjkfKdXU+U7YdpmizaY4 Vwowqi8M7A/Qh0P1r7g5kQxiZFsAsUKIpnVco2Zo+q0YTkV7CAajJQsi91DZvbBF7Zx8kKnfUcO AXv6nF8BlDCNPXxK4ihN/IHass8BSz9g= X-Gm-Gg: AZuq6aLaNB3rJK17L9C5mjp/fW6ZOXXYXevTxqsVhnm4T7zVC2iholUKkzATJ5WvGhy ZHTjNcrWM5+6x0tItEu98MkMV/zX3pILJ9Z9WqkLbmrJCSBkb5XsOuSs+HpNDAz0HMc1SnZ8h6G tVQxzgfzrLzs+pSDb6ksc4LALgvaViYfoDGqyosM04QDd4H4r95TG2Sgodq3RfUlJgxPo/T2MU4 o3izv8RSKtYrC7KXJRC9NozcCKsM2bSiPDWWW/hMrpSHwFyp7e9kuKbYoq3Sg1h1WRgFaDZzDrf fauyySpqVJkeA2b72Jh9YkgnjdSyAs/Z3lE2zqqATFJWxfQ= X-Received: by 2002:a05:6808:199d:b0:450:cfd3:cfba with SMTP id 5614622812f47-4639f221841mr9906437b6e.57.1771344288161; Tue, 17 Feb 2026 08:04:48 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <1f25d77e-224b-40d6-bf19-18dfdfc9de54@rwec.co.uk> <3C55E40A-1F0E-49FD-BB0B-977C10218E5A@mabe.berlin> In-Reply-To: <3C55E40A-1F0E-49FD-BB0B-977C10218E5A@mabe.berlin> Date: Tue, 17 Feb 2026 17:04:36 +0100 X-Gm-Features: AaiRm51Uj1BklERLrxUJA1Uqage0AA82wywruDP02G6gTaGLayTwLc-coTwYl4U Message-ID: Subject: Re: [PHP-DEV] [IDEA for RFC] let the "new" operator fail when the __construct() function returns a value. To: "Marc B." Cc: internals@lists.php.net, "Rowan Tommins [IMSoP]" Content-Type: text/plain; charset="UTF-8" From: mirco.babin@gmail.com (Mirco Babin) Hello Marc, Op di 17 feb 2026 om 08:40 schreef Marc B. : > I'm with Roman here as well. > Yes, it's a BC break, but as Roman suggested, there would be a > deprecation phase before and forbidden only in PHP 9. This should give > enough time to adopt. This RFC explicitly wants to reduce the BC impact to a minimum as stated in the prologue. Changing the return type declaration implicitly to void breaks that goal. The "Unaffected calling the parent constructor example" would become affected by "void" return type. If someone wants to follow the "void" path after this RFC, that's still possible. For the new "void" RFC it doesn't matter whether this RFC gets accepted or rejected. > > Also, you are talking about the constructor only, which is ok, but I > believe the destructor needs to be discussed as well and mentioned in > the RFC. > I have mentioned the __destruct() destructor in the Rejected Features chapter. Because: - The details of the destructor are completely different; it is called if the zval reference count reaches 0 and is called by the garbage collector. - Also the destructor does not have security-sensitive impact when returning values. - Also, the use of destructors is very unusual; I never use them. - This requires a separate RFC. Kind regards, Mirco Babin