Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129603 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 672091A00BC for ; Sat, 13 Dec 2025 15:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1765641530; bh=HJKoqJ/my+fzzEoCApdoy/V/eXBkXHnBGE1ZK89ksT8=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Q2wJeuEesbZKxQjbbljtu0GBBIiloS3ZYCkk9l/FDz1XwgQwGdnSGv1Z4YqhHwzUk o0WUbBQx1LC/4wzJ7hDQWotT1jEFaz7TLIGZ51ss24cg/wZDV6LccZreaLWOqmt4t5 qk8lbDcIwfbPvNS8N9cd5Gl8bzbpcpPxuShHieprAebSWqJFXddOrbOxYcLmQzvxGw +4rAh+Xpv1p+kkghVuGgpUDqprnFuIpmWVmhyR02VgxIosW5kzTuggRQA3adGkNU5P 7cNy3tvVg+d11d7V+8zgSCTvqmW4c6o1gYuj5KeG1AGAH6I6W5U5AeN2m0x2wcxF0r EhAQq4+5g/GOw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 213691807A4 for ; Sat, 13 Dec 2025 15:58:50 +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.9 required=5.0 tests=BAYES_40,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 fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (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, 13 Dec 2025 15:58:49 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 1B79C1D00141 for ; Sat, 13 Dec 2025 10:58:43 -0500 (EST) Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-04.internal (MEProxy); Sat, 13 Dec 2025 10:58:43 -0500 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=fm1; t=1765641522; x=1765727922; bh=RhcCKHJFIupx+zj1og40R MCetFUrFX1BoJITaUK3ZDU=; b=dpYvXMBLnD2IstWzsfpsJfFhs8xQqaRJY24K5 g1FSpq/6xJ5wWlk2z3OVzFSHJasakccz/SHjYClN+RMnQEaw7OmpHYhwwEsEBoU3 Pq4JOd55Jl6EMBijJiGKqHfhH9+xqTef1BqQJQO3gLi4AMFh3PLZbs1Xvzum1V72 5u1VyHidpEzogwELcp/a2kPV8csSKG19o9w9JvBvI8ESO9rMtyD73rFNfwlS7ySj MR7fTXlVMGbbyqC8x1enpEQYdY/jdc4Biekbz6C0k8mCevys5LcVFC2XMIJcBq32 bs6ywWliW5cYeiKB65eq8o5Fve+vr7HP5yfedY7Y0GEXVGJ/A== 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=1765641522; x=1765727922; bh=R hcCKHJFIupx+zj1og40RMCetFUrFX1BoJITaUK3ZDU=; b=b+BX00EjG83rsXSo1 VMVa5khpzcLvzt3HqSwax1F6r3xw7ZlFp3S/jZheyWks3VKsp0bbdItp6mf7u9Z1 yhBhucZl1GWwjRCQ3zh0Q6I2l0htbY1yCktFulTVaytUaI18d00BrxpDJS9D8sYy IfkoqkG6erk4dJeCRpKdWOx6pMZ1yeJdzylF3iGtZ3fdj+LDcv+KDfh0A9gfHee7 g5BOV7+T8WumFYlvCf5P/ANRrRs7okEws+HObZD9hue9jNLvfRqGhoFQc7f+W3rA x1Wu2xTeaXkJB8kLaWSKsfBV/m6NVJQjg/HmuaVLSwoft4XA4tzc0tOBrO7tx+54 kEEag== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefudegkecutefuodetggdotefrod 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 A60EF18C0066; Sat, 13 Dec 2025 10:58:42 -0500 (EST) 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: AQWJq8Gl4GWJ Date: Sat, 13 Dec 2025 09:58:22 -0600 To: "php internals" Message-ID: In-Reply-To: <08966c87-cdd0-4402-9dcb-098e7b327d9a@app.fastmail.com> References: <26a2f13c-f318-4d6c-9595-bfaaebcbabcb@rwec.co.uk> <432ca4ad-7bcc-43bd-8e05-3121839b4ff7@app.fastmail.com> <6ca9d7e54c291d1ce8fd74b5d1977034@bastelstu.be> <08966c87-cdd0-4402-9dcb-098e7b327d9a@app.fastmail.com> Subject: Re: [PHP-DEV] Examples comparing Block Scoped RAII and Context Managers Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Tue, Dec 2, 2025, at 1:57 PM, Larry Garfield wrote: > We're very open to tweaking the keywords. I can see the argument for > "as" being a little misleading in PHP's case. Though I'd prefer to > have the EXPR first and VAR second, whatever the keyword is. > > Another potential we thought of: Just plain =>. It already doesn't > imply equals, would have no keyword breaks, and is still only 2 > characters. > > using (new SomeManager() => $someResource) { > // ... > } > > Thoughts? > > --Larry Garfield Rowan (or anyone else), did you have thoughts here? Would => be a more self-explanatory symbol to use for the context manager block? --Larry Garfield