Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130588 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 D44411A00BC for ; Tue, 7 Apr 2026 16:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1775578864; bh=7mYGHnpGK5Q0D8a140TPvHAJJWSU6N+4az8p/7ldL1w=; h=Date:From:To:In-Reply-To:References:Subject:From; b=UQve+rz7z46se+EpyxZTKSjJQGVpzEjX+H/GRuFoLBmpOLsLIWHP1JGkQl1J6DIPO nvgtFZq8/wJNk2UH6Nc8ifcH81EWrjbXaMRqHdSH1ZjNL3RKKCa/CpNa4zQak73ITq 8SVzC1dH8AcNtapuW3VQaHPXXxN1To/al9/84WsjNNmyrw5TgHC/yAj83zWKF/A1wH eZHXo3O2kdAOBRBqPO2VF+D68edgIZNPR1AVeHKMZ6LrDwzg1sxtihqhkzmR91ZEjO fLHWt5b58/35dHZMuaLkDlXxawLMQysjs7+XdVhb9kc+Ttm/LWZU/7MeaFWCA3C6Df 7wlPmarIFTfJA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 99818180077 for ; Tue, 7 Apr 2026 16:21:03 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) (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, 7 Apr 2026 16:21:03 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id ADE7E7A019F for ; Tue, 7 Apr 2026 12:20:57 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Tue, 07 Apr 2026 12:20:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1775578857; x=1775665257; bh=E0yC/hDi57dmGjniTePfE NtqX2qr0WrVDeE1i70CqqM=; b=WkJMXbA0LmX/+WdkiiN+ahQtNPUvHBOG6FwHh e7MrGBqrPSM7hQY0B5bK8LLHmY3ygE4k9+OOtB2DLq6c+vRimnnWBHJ7T+K6qviK D0vHbPyJTYLnMLmMhzQBFMc4T4tpreebzbeoY5/J+LwE57Csn1GyeY3HY/WwsChL /3kwR+Dbveb8tjpS7FW8QRR4a6OTeLW9PwMknjBAHeh9oh6a6+FW8gpvvH6tpVqR lUUSMWwgx3yoEa1qekCYhUmbfFPqVR9uzT23S/r4B+zCerj5Zf+3+c8vLHizX9KX xXKFgDjiAWLWL9f5nQ9KjGt18tlcHeHAjPEQD/NQvCC06BwMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1775578857; x=1775665257; bh=E 0yC/hDi57dmGjniTePfENtqX2qr0WrVDeE1i70CqqM=; b=UlpTImz2R8GuvkBBu Y1Up2sGi+25r31KYOEQMNJKFxwIq3pdiNdf0y4ZQxWV4cGshRbi7L29eM2glR3ap mi833ei5qoiXUPI3UdE3CAoMTGb3+Ka1tP3Iy24jqyxtRCu81br/V1vF4OWrhhBV 0+Tb6K9wweFMrPY0PHhPsJpvPRDwcad6/dnnwN9IXeR7jRSrunbUH9z9pEFnMPun AyNWMZJr7YO9Ru53C4f41nt4ZUIrIrM4hOeMyx85IgyzZugaJczhOO0RbcV8/7/U Twu3j3uknPuSRLS4lDcgE1CNgeiVdMGgWIfgCHvBerFwiiov/xGDIN8Nz6jvS+O0 SXQMg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddvudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfnfgrrhhrhicu ifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqne cuggftrfgrthhtvghrnhepffeiiedvhfdvgedutddtgeetieeugeevhfetheeffeeftedu iedthedtgeejueeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggprhgtphht thhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhsse hlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 9F272700069; Tue, 7 Apr 2026 12:20:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: Atmh9k-BTBuN Date: Tue, 07 Apr 2026 11:20:36 -0500 To: "php internals" Message-ID: <841b8e97-9052-4868-badc-1dd1dad0e99a@app.fastmail.com> In-Reply-To: <02dbe23bb5a4e53be7bf2db7506e07b6@bastelstu.be> References: <5d96fca3ca5418e6e9e5d8871b26477f@bastelstu.be> <8bf1b0a7-7771-4f81-b92c-49bb019f7f9d@app.fastmail.com> <02dbe23bb5a4e53be7bf2db7506e07b6@bastelstu.be> Subject: Re: [PHP-DEV] [RFC] Context Managers Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Thu, Apr 2, 2026, at 5:13 AM, Tim D=C3=BCsterhus wrote: >> continue means "stop this iteration of a control structure and go to=20 >> the next one." But in this case, there is no next one. switch makes=20 >> it an alias for break, for whatever reason lost to history, but given=20 >> that it now throws a warning that seems to now be considered a mistak= e,=20 >> so we don't see a reason to propagate that mistake. > > I think Rowan explained that well in his reply. > >> If you have an alternate suggestion for how to achieve this=20 >> functionality, now is the time to propose it. > > As implied by my email, I believe that throwing exceptions should be t= he=20 > job of the `throw` keyword, not the job of the `return` keyword.=20 > Otherwise users are going to wonder what makes `return new=20 > SomeException();` different from `throw new SomeException()` in that=20 > case. > > Best regards > Tim D=C3=BCsterhus We've updated the RFC to address the break question (new section), the c= ontinue question (which is now a secondary vote), and expanded the reaso= ning for the `return $e` decision, including reference to the original P= ython PEP which explains the need for a distinction. --Larry Garfield