Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129759 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 518A41A00BC for ; Thu, 15 Jan 2026 15:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1768492356; bh=LW1NZThSDG1oSERGWMAHwkqtsH551FuidoxATq6jxBE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bAtPrFRswZDwL9zz7/0FFzwpkQNHUMwCyelaYUFc5JYaBwx3R2XMS21RbtQCH2MDQ zlZzV7WT7714tU6Oz4NAx5JHS21mvjaho8MofHsU+1Bc78/wlFRDaI7yZKM08ESXw9 19gBZ/y02RmCGq9d30KvpW/Uf1Lgdp313XruVnorDfd5tXEAtb72kWUUN6cw5IwmhA uXrfK7F5rg+1u5ehfB1HuErJY7cSWr1itRmAwJHXoSvjI15u7cYICVBD/C/VUMmxH3 8+ZC/It2XH4IX4uOGWASsGU9nBuvBMk4n22D/lAUPxLQlA4fSr5YCp90A4p6p/OyK2 +H3htLDWEO+Rg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CB04B180079 for ; Thu, 15 Jan 2026 15:52:35 +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 ; Thu, 15 Jan 2026 15:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1768492348; bh=zMj88cNYNfCW5FhFo4ykxSSZtudP1b/88i15hr9x1Fw=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=UVJ32AKEI/fECYOdlLLB9yr4m4IeYCfBQsLZn3VviDryue580q16lYVb9cVBbQrW9 aJBmP6+N9BeYwpsqMsU1q0dF5dgwVnN3z17H4HRiixrg7PPgxIzQqKY5Uod81e8RLo YWcQ48QRRq+OlO4Zsqlhg/SrgCVP4eZDjObFShiyiRRmcis9+ebd0y7+A4l2iKJLWP i6kicnAVX+V0K+z+A3CVli7Wf7daW4irRo9XHtP5UWD0y7wkUxEZHAsf1sBm4FtSpR onXibD84w3Pv/swRdhoBvRxIzI0JUDY6RrOTteUsdOG1hcUm5h2ZiHaQ8Jz1Ffk4CU htarUDFE0WEvw== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 15 Jan 2026 16:52:28 +0100 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] Context Managers In-Reply-To: <905d9879-70ef-4c87-8578-26519c6d4818@app.fastmail.com> References: <905d9879-70ef-4c87-8578-26519c6d4818@app.fastmail.com> Message-ID: 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 Note: I've not been able to fully work through the ML discussion and meaningfully think about all the commentary. This includes some of the older emails. I have also not yet given the RFC an in-depth read, like I would have normally done. Some (incomplete) notes for now: Am 2026-01-13 23:19, schrieb Larry Garfield: > Once those issues are addressed, I think we're nearly able to take CMs > to a vote. (If anyone else wants to weigh in on some other part as > well, even if it's just a voice of support/approval, now is the time.) Something that I had noted in response to Rowan in the (what you call) “Bonus Thread” in https://news-web.php.net/php.internals/129582 and also in this RFC's discussion in https://news-web.php.net/php.internals/129618 and what was also mentioned by Marco Deleu in https://news-web.php.net/php.internals/129083 and what I feel is neither properly justified within the RFC text and as far as I can tell was not really discussed either: The fact that `break;` and `continue;` target `using()` blocks. To me it violates the principle of least surprise that foreach ($users as $user) { using (new SuppressErrors()) { if ($user->isAdmin()) { $firstAdmin = $user; break; } } } is incorrect code. The RFC just states *that* this will happen as a fact, but does not attempt to explain *why* that decision was made and neither are there any examples showcasing how that could be useful. I'd also like to note that there's also an “Open Issue” listed in the RFC that is related to this topic. --------------- With regard to the desugaring listed at the top: Can you please also provide the desugaring for the case where no context variable is specified for completeness? Best regards Tim Düsterhus