Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130502 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 B04AE1A00BC for ; Mon, 30 Mar 2026 19:36:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774899416; bh=fjZFmcqB7mXrTIgMh9uZ/EumBlbHq5wj/Qdts5IyVx4=; h=Date:From:To:Subject:In-Reply-To:References:From; b=dEjL5QgyRRd3K1oGXxV21Ja9SgaxDlPmlQhnI3lNDlX2eBQLuYkFdw57skWZ7MV1I 7twys5h08Pu0SCgBrZsEYdn6VAloCtdSaBITXMx2+g4uhcBvRTt+kz8PCrKc4BxBIF kXzlaKT4rmpzPUNGMZtt1hql5U4UMywEakLGXgrCIBbjy3SYwNv3OKkhAy1tYiMtZQ gT0Dk/boJT5T9FUsPVpDDLrC354raG/gLIp0UN4hVv67gEtTkJXzEgluAHC4Jw36DY U7fzY8q28fNBvoyoqXrf9o/M74kvUtUvxxLEXVb47nXlrUNWyUHWsXKd8wIm+lR9gH Xv17WGsI86R6A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 02BE4180078 for ; Mon, 30 Mar 2026 19:36:55 +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_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 30 Mar 2026 19:36:54 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id 348D31D001C7 for ; Mon, 30 Mar 2026 15:36:44 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Mon, 30 Mar 2026 15:36:44 -0400 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=fm1; t=1774899403; x=1774985803; bh=K9AFGVncffe7ZlZyRQxPkVj72A9lP+kBsAgeu6JxzdM=; b= KLjqP3VNiKrHOQ3fXvT90I0Db1ELMVcADAKRlgEDJpo/ExjhMe7Ny0zfod2U7axZ RdomYqTdZgnfHrITcRXFqL5KM5kG51aZ/Y39oSUTwedDO7SAoYUzYfxB/tSxoevD giyj3D38FhjsiA6M9B/H2AToFurI6FsEbsFrrWg5b8PQany98K3CfkSN0cLT0nS6 zECkbKsUn58fzajKY1AanUGm6cdSDJmOWlyapMuPB8jh6KjhqvFSMhg5woRk0r6q YjdXM0LRGf5QRDvEHH0FzG8N7Gs13zaLyfJwa8CcYuicDlO8BKk4WBdyFlWmN/tw ebquLtobg7aqg9w7JVqzBg== 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=fm1; t=1774899403; x=1774985803; bh=K 9AFGVncffe7ZlZyRQxPkVj72A9lP+kBsAgeu6JxzdM=; b=IOt7UL4duL+I+Zhbq zqPnO02bm6EePHwHpK2K+sfqQSBYSz5/d63bixS/m/HIM8KnIihidB5lE3WP3mxi gUOggq75hvQAgOL8pR1oiHiKCBhSIbtchsRmJIqYAcQgJOqV/axQlSwqXYSF968Q vfROwtw03D9qiqZW/UduefNC09krIjC0nhk9pTkqmQe3XC5D41MzOOxBudr6H+s7 9WXYWvqNzmrDpuFhPY8HNdLZJUGp2bC1g4M4GYWAIADjpMJqplgGdnp9uupjwrQO O+F2/84IlqXH4JUgI8DexCx9Xb1V+zGUOgwDRp1LhO0+tYg3ZZ2OsEnVLPCSSDAR 2OE+g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeffeelkeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvufgfjghfkfggtgfgsehtqhhmtd dtreejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshculgfkoffuohfrngdfuceo ihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtffrrghtthgvrhhnpeeffe egleehffevgeelvdethefhffekhfeihfevgfeiiedutddvleekfedutdfgleenucffohhm rghinhepvgigthgvrhhnrghlshdrihhonecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepihhmshhophdrphhhphesrhifvggtrdgtohdruhhkpdhn sggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvg hrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 30 Mar 2026 15:36:42 -0400 (EDT) Date: Mon, 30 Mar 2026 20:36:40 +0100 To: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Context Managers User-Agent: K-9 Mail for Android In-Reply-To: <8bf1b0a7-7771-4f81-b92c-49bb019f7f9d@app.fastmail.com> References: <5d96fca3ca5418e6e9e5d8871b26477f@bastelstu.be> <8bf1b0a7-7771-4f81-b92c-49bb019f7f9d@app.fastmail.com> Message-ID: Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 30 March 2026 19:48:05 BST, Larry Garfield wr= ote: > =2E=2E=2E break is the natural keyword for that, as it already means "st= op this control structure and go to the end of it=2E" > >continue means "stop this iteration of a control structure and go to the = next one=2E" But in this case, there is no next one=2E switch makes it an= alias for break, for whatever reason lost to history, but given that it no= w throws a warning that seems to now be considered a mistake, so we don't s= ee a reason to propagate that mistake=2E I agree with Tim that making break and continue define targets differently= is a really bad idea=2E It's fine for a single "break;" or "continue;", but with PHP's count-based= targeting, it would lead to cases like this: if ( definitely_right($loop_item) ) { $found_item =3D $loop_item; break 4; } elseif ( definitely_wrong($loop_item) ) { // targeting the same loop, but there's a couple of "using" or "switch= " blocks in between continue 2; } If "break 2" terminates a "using" block, there are only two sane behaviour= s for "continue 2": - terminate that same block, as though it was a single-iteration loop - throw an Error, because the operation is not meaningful Looking back at the discussion of "continue targeting switch", I see I mad= e the same point back then: https://externals=2Eio/message/102393#102500 The consensus in that discussion was to *only* add a Warning, with no plan= for further changes=2E It's not a deprecation, or a workaround for hard to= change legacy behaviour; it's just a helpful hint to the developer that th= eir code might have a mistake in it=2E Regards, Rowan Tommins [IMSoP]