Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129099 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 B3FA41A00BC for ; Wed, 5 Nov 2025 23:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762383783; bh=ib3ofs2reed/ERDCail090oa9SuQMI93ZQpBJW0wluI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=lMY0m6ULF8TAYKKRXs6RtPhK40kaLnUT6BvfECophQi2lY15ZtkoQCd1WCfzSj4x+ V4/DCG5wsvtt34OG/JAl5GtY7kwiy4Kq7OW8VWVvoeogPNKF+bUVbBv/cqolWluRjs 7vxm+4C0Cf6qte7g+ShSY5sqVHKdRu90gG20wbkDs5BDr0YtdAFsJ8wrQKB03d0Mjv FVhPC4Sgxa7XKbpwRNNFCOtznEuQLmL/fFKmvw80WBNRRd045b0ExH6/wrejyTu6uc GGnT2+4ySzRRBnSMIc8qKZhnzJXHw+UnCE+futwbV7z9qgrGLq5wiAk3QFhYR6sCmA opjOvIy/rIqiQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 78DCF180072 for ; Wed, 5 Nov 2025 23:03:02 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (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 ; Wed, 5 Nov 2025 23:03:02 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id C3B897A01A2 for ; Wed, 5 Nov 2025 18:02:56 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 05 Nov 2025 18:02:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; 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=fm3; t=1762383776; x=1762470176; bh=WEgVpve4JRGLtOGZjZm8ldnYh2H+6sRNvnQZUh1gm60=; b= eyHmWWlg++WsbHhSXXIlk0C9DgV7TQRn/Y0lt+rHMctDcyzfAsutwoHzBvLakWO5 kAxR8oNS64kpdsxnx6uGvbL7BG9oon+uPXeet/97l9T1hgfxjFE095egEAWxU67p 1FBVfPaHG82IeUHvSltKIp5bWgfjpGdbfvGdnK1HxXu3GlTOuiwGebIVptWeKehr 8nzwUmQ6CCofXgaw0uovB8VQwTZzcL/TGB7ApAdh7mnKivFn2KQiShVxiAyv2jKw qfv7OfQIfOpPZ5b9BzO7ej/EaZI23+aPx5liBDvTS1ZPtwB5yvwYbRjefSvghO/6 7EvaOQkuG+1s6b9e11TfrA== 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=fm3; t=1762383776; x=1762470176; bh=W EgVpve4JRGLtOGZjZm8ldnYh2H+6sRNvnQZUh1gm60=; b=lz3dGdJhBEIOP1t5E /VtsLZL1u3Aw/4j1TXvdq8Myj/SO88KhAvamZPLb8qoce8oPMlADG11fNrAKInZX pWUHMpxMHAMItoqJmDWGB/1B79xgpKFof/EI8AieuUjkyIkwO8rnXFehvCywtMnB 58uVBOdZNS1TM9dficoya74rl5y8Uwp9Z2YU0LcTDK5u9P7jgcWi45DOTEgpQ28l W4/RiPzNFLa2G4K3oYJCoZniRJjKMmXsNgqvoRMi0TJh1jisggaqYB+HHdec6qWP D4ohuOKG9DKpAmuGpmZlrUmo/hKUBqdH7gxn6Lpiye0+4S25wCodxBtP1C6276Yr 6qqtg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeehudeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertd dtvdejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshculgfkoffuohfrngdfuceo ihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtffrrghtthgvrhhnpeelte ekfeffffefteekieeuhedutdfgjeeileegffdvvdffjeduuddvieeiheehueenucffohhm rghinhepphhhphdrnhgvthdpvgigthgvrhhnrghlshdrihhonecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhmshhophdrphhhphesrhifvggt rdgtohdruhhkpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtph htthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 5 Nov 2025 18:02:55 -0500 (EST) Message-ID: Date: Wed, 5 Nov 2025 23:02:54 +0000 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Context Managers Content-Language: en-GB To: internals@lists.php.net References: <566ce444-0cba-4a72-94e3-64f52b3cf93c@app.fastmail.com> In-Reply-To: <566ce444-0cba-4a72-94e3-64f52b3cf93c@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 05/11/2025 22:37, Larry Garfield wrote: > `break` and `continue` are interesting keywords. (In the "may you live in interesting times" sense.) Sometimes they have the same effect, if a control structure is non-looping. Or they may have different effects in case it is. The main non-looping case is `switch`, where for reasons that were before my time the decision was made to deprecate `continue` in favor of just supporting `break`. However, blocking it entirely is a problem, because that would change where `continue 2` would go (as `switch` would be removed as a "level" that it could go to). It is kind of a mess. Nikita's original proposal was indeed to ban continue targeting switch: https://wiki.php.net/rfc/continue_on_switch_deprecation That doesn't mean any targets would get re-numbered, it just means that the case which currently raises a Warning would have thrown an Error. It was talked down to a Warning during discussion: https://externals.io/message/102393 That was partly about backwards compatibility, which doesn't apply here, so I personally think either Warning or Error would be fine. -- Rowan Tommins [IMSoP]