Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129769 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 425DF1A00BC for ; Sat, 17 Jan 2026 14:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1768661317; bh=cvrvMNR365uTxhvCD40hnwgGrFGJSv4V4XjfO6aJg3M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BQFOoy50goYmaZB12gC53p0M5T7NnpD4cF19uYHqDOlup+nOLKBB1n7EqFSmG4v/d +HLBXlhrxCTwr6SwGSaAbvTtl7J5HV1u1Vlqy1/tGYuY7ScdV0N9piI+poiVDAW+86 bkbCdermZnx0qxAxLHkmo5frLTSrf4xPz34QDRTtVu0qoYacxAA3tWUJQWUGUwZDEx 2+aheLrDBZxI7yqrnD9zL2cOsClH727+4BJqwABAXHi2Abiqz5i7IUFAaz0N4R7vdR 8WCy9yS3+uWTxXOq7wi1n6uNuky2yfqMx+glZAnfv+e7G2hWBinlpNC9+QohMwQTiw Nznp2EZg6upVw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1C675180079 for ; Sat, 17 Jan 2026 14:48:37 +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=1.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, PDS_PRO_TLD,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from zebra.cherry.relay.mailchannels.net (zebra.cherry.relay.mailchannels.net [23.83.223.195]) (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 ; Sat, 17 Jan 2026 14:48:26 +0000 (UTC) X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AB38F8022E9; Sat, 17 Jan 2026 14:48:20 +0000 (UTC) Received: from server52.areait.lv (trex-green-2.trex.outbound.svc.cluster.local [100.110.196.244]) (Authenticated sender: yszpovajlk) by relay.mailchannels.net (Postfix) with ESMTPA id 9FE398013AA; Sat, 17 Jan 2026 14:48:19 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; d=mailchannels.net; s=arc-2022; cv=none; t=1768661300; b=vpSSi1yCmMFbqpej7sUbVw+NCfwT3g3I0r9Qwb6u87ey+X75IY1XkgdIEUcQLOfQb4zUe1 k4sbUPf8sgxI44VjGYjF2xfi38H50TehRHTWa4lC8++EpMSCTsb6ENQgu4C3Tl1/0Gtirs dvEe1QC+eIt1d2SpA2i7yy9faK2Vvj+9rN277ZR16n8gZ3tsZlUCnStDTHi1JE/BtJxIvI pVdXeWXH48VR6MAXM1719Tulz6zkIxZB3Ep3FUjAk/VDPGlJ/QJBon0bj5HV0zCxP+Sbhe uwZxo3nE51tVsOd8teY0NhmuhvvUYIG6/FFXSbz2RbXtUvBvXzpWu3kjBGR6cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1768661300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=n5ydvAyhEOTUdBgOdHaYQWG9Kxd3S2iVEI/P050EvME=; b=qMebELe4OKJJu7KtzIcPW71mJzehU7Q5+M7SRQwRDP0P9jd8yIQMDCFe54Jr4lmvPfadS7 AUs58VI+8rPvDQ39CI2VCsEFZJzQCO7/PA26MZQLEC3c6W70ZFCVWPUju4S1M3CIE+zQJM MQ3eV0vNZheVzVfk3x7NUvADwwlRhBrOVlT0JZj+O6mCO3nqSVrhhja0EMIb+lX6dSwKQo 4ITZv5VIO2hU9dxw1RIuZEJOmQQ++rKsRZERn4Y+gq3WkiGm0GJ4Tyt8gbtMt5iQ8fnPJw ZYVfuOJM1WCxs0MIPUtwpYiywR8BbV939yzGVbr2nBK8bSJurVg6c3GWV5dqbg== ARC-Authentication-Results: i=1; rspamd-8f4d6bb8d-mcp4m; auth=pass smtp.auth=yszpovajlk smtp.mailfrom=juris@glaive.pro X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro X-MC-Relay: Neutral X-MailChannels-SenderId: yszpovajlk|x-authuser|juris@glaive.pro X-MailChannels-Auth-Id: yszpovajlk X-Relation-Soft: 6136f31f0f0a1bf9_1768661300340_211999290 X-MC-Loop-Signature: 1768661300340:3467204759 X-MC-Ingress-Time: 1768661300340 Received: from server52.areait.lv (server52.areait.lv [83.149.95.205]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.110.196.244 (trex/7.1.3); Sat, 17 Jan 2026 14:48:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=glaive.pro; s=default; h=Content-Transfer-Encoding:Content-Type:Message-ID:References: In-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=n5ydvAyhEOTUdBgOdHaYQWG9Kxd3S2iVEI/P050EvME=; b=g2NZZHruUoGm7EYVv14h2vtB+z KwhL9lcgbiZcEgvReB3RKqHNuxjx15kyqccsyCy4c3r8HVfBs+1kSJuOfYr6tsdL87pIUOlj6vD9X QN3PkR3zxfH6aBjmvr+EHUC5F41ZOReJEZzvkNzeV33NM9XoiTUAoIsmHOU5v9xQySY4nkVR7oCZT Q4EH5LtfNdlHP4YdlpJvWC6xDeygtSVh3un9Rw1bvi5+OWsztZzw0zH3naRwkk21KtPYOwvolbRDF YzulIZRQzLNnplc+n3yQf09KsNxajYlzxc77wa2fqNIe/E/gjh2CLzW5XmRSvLDy8OLMUPDCQSnCW hZVBHSMw==; Received: from [::1] (port=52396 helo=glaive.pro) by server52.areait.lv with esmtpa (Exim 4.99.1) (envelope-from ) id 1vh7b4-00000009vbO-1ex0; Sat, 17 Jan 2026 16:48:18 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Sat, 17 Jan 2026 16:48:12 +0200 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] Context Managers In-Reply-To: <8cd697c3-5e25-4854-810c-da220da3f6d8@app.fastmail.com> References: <905d9879-70ef-4c87-8578-26519c6d4818@app.fastmail.com> <8cd697c3-5e25-4854-810c-da220da3f6d8@app.fastmail.com> User-Agent: Roundcube Webmail/1.4.8 Message-ID: X-Sender: juris@glaive.pro Organization: SIA "Glaive.pro" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-AuthUser: juris@glaive.pro From: juris@glaive.pro (Juris Evertovskis) On 2026-01-15 18:01, Larry Garfield wrote: > `continue` is really just to mirror what switch does with it. If the > consensus is to simply disallow `continue` entirely (which is > inconsistent > with what switch does today), we're OK with that. I don't feel > strongly > either way, so we're looking for a consensus. > Hey, I think the benefit of `switch` supporting `continue` is to ensure consistency in the number of breakable/continuable structures. Consider foreach ($a as $e) { switch ($e) { case 0: foreach ($x as $y) { if (!$y) break 3; } } } If I need to change `break` to `continue`, I will naturally change `break 3` to `continue 3`. I would suggest sticking to same in context managers — have it respected not because you would ever `continue` to exit it, but to have the onion layer numbers consistent. BR, Juris