Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130590 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 7BEDD1A00BC for ; Wed, 8 Apr 2026 16:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1775664485; bh=BgQ7KSwnFyIoZ/FcTCpGZoWmDQAgyMCKdBVLSXNWaeU=; h=Date:From:To:In-Reply-To:References:Subject:From; b=E3YNT+tB/7+4vUUuwp96Rxp3JOMKxveX2ddC5sBzSXDerl8FtXo+h94Yruxz/k9Oa K7/26p2zKB02b2uYbt92ru4eTYGhYLL2AYgeMCMNXaTeeuJwrquNWI8SpNqty+Ra7j FtXgUh7lqtsBX1pnGHyv8B45xMXL6oXtPtwwbAFOtcBhhxyY5zEzxI2zzv0Ed9lrDK 4P/D3nOmGCSOt7DxzVVFJMPvc9vajy0sRAlGqJ+PQn4zWZ4iPUYwi4xBEoJF+N1gjM tDaEE24MgTt0HX7Y4NxJ0dgujgtYcP7s9bc3YHhOqa0I7RPSwYlDWUg5kDmDxDNTvY KAjERJPW0CdrA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 272EB180074 for ; Wed, 8 Apr 2026 16:08:05 +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-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (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, 8 Apr 2026 16:08:04 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3016E1400041 for ; Wed, 8 Apr 2026 12:07:59 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Wed, 08 Apr 2026 12:07:59 -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=1775664479; x=1775750879; bh=vq/DOemhrLf7Pi/ES3fiV QNaD+3HJKvPhxSAD3OYRIo=; b=Fq8lexNJlXOgcBb/cwm5vbfKXIEMsMZD4fY0B 8ZPAwoqryMKlca8wHGfVb/cX1/ypg715wRDGyZqtDNp6alKzz5SQ1NNX5hC0FM0E p0640fWz/KU3s92eTQnTL2KsPhyyvt+klBaWj+EEH4Ijhasi7PzjJ6SkWTraTrmC 5w8EEqHTjFsYTsxKEWpuU+JJjuKyD67M8n4jpL40mhaspRBCsn2Wx8/HQsfJCY3C 7+Qrs4Jccf6KkrNA+wj9zuk4RB3CIqHnuV1ZRfLpJycWjo0Q921hB1In93nitxP6 0smPlvqB9oqJknG0JKQzCfdAcotUXiTE0O4K9KQjb0+rDEvbg== 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=1775664479; x=1775750879; bh=v q/DOemhrLf7Pi/ES3fiVQNaD+3HJKvPhxSAD3OYRIo=; b=ZZX64eKRjakDwGK+e hH41QFplBUTt6B7liCbOcP3NpKBUP3YpXA7iNmBy9JE6LAzOfLiiofSBEJJNCLMV YdPY/mOKJDN+cf01p32sonsMTQz00V/E6YG6zlL3qOayVLrvm0zIpr418oE6ex0Y 4T9CNpIknwLk6nNmRy0IBnGKijBBlXmicFFU4m/itKrYqLBj5OHh26ykJAj5Hmwm RUXEdkyJpJv1PHCYNzt0JAY5iqUP1Uhy3vdokiVoOJIYz4FRfRZnrXxPBs3zVZ0K jyz4nSZ1sqG/Y8wcYt+wSySCvDXm86yCDWevKc4hpgLEeHhkjZsXpHZqTQ1LtQ4n zGZZQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddvgedtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfnfgrrhhrhicu ifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqne cuggftrfgrthhtvghrnhepudegvdelgfeugeehfeejteffudevleethfefgeejffffleeg tddtveekgeekudfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggprhgtphht thhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhsse hlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id D290E700069; Wed, 8 Apr 2026 12:07:58 -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: Wed, 08 Apr 2026 11:07:38 -0500 To: "php internals" Message-ID: <4de9a1d5-f412-4f99-ae95-6d66cef1501b@app.fastmail.com> In-Reply-To: <0c59c7d4-8748-47ca-a626-179661803b51@rwec.co.uk> References: <5d96fca3ca5418e6e9e5d8871b26477f@bastelstu.be> <8bf1b0a7-7771-4f81-b92c-49bb019f7f9d@app.fastmail.com> <02dbe23bb5a4e53be7bf2db7506e07b6@bastelstu.be> <841b8e97-9052-4868-badc-1dd1dad0e99a@app.fastmail.com> <0c59c7d4-8748-47ca-a626-179661803b51@rwec.co.uk> Subject: Re: [PHP-DEV] [RFC] Context Managers Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Tue, Apr 7, 2026, at 5:27 PM, Rowan Tommins [IMSoP] wrote: > On 07/04/2026 17:20, Larry Garfield wrote: >> We've updated the RFC to address the break question (new section), the continue question (which is now a secondary vote) > > > You are still relying on an incorrect explanation of the relationship > between "switch" and "continue": > >> This behavior is due to a quirk of PHP's design, where `switch` is treated as a looping structure, which most languages do not. > > > > "continue" is counted for switch statements not because it is "treated > as a loop", but because PHP has numbered break and continue targets. > Numbering break targets differently from continue targets would be > extremely confusing, so they have to target the same list of constructs. > > There was strong consensus on this point in the previous discussion. Quoting from the Nikita post that is linked from the RFC: --- a) In PHP "switch" is considered a looping structure, for this reason "break" and "continue" both apply to "switch", as aliases. For PHP, these are reasonable semantics, as PHP supports multi-level breaks. It would be very questionable if "break N" and "continue N" could refer to different loop structures just because there is a "switch" involved somewhere. --- Switch being considered a looping structure does qualify as a "quirk" in my book. If we want break/continue to still always have the same numbering, then "do the same as switch, even though it is a Warning" is the only option. Not having an early-success syntax at all is not an option on the table. --Larry Garfield