Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129932 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 C0AC51A00BC for ; Mon, 26 Jan 2026 16:28:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769444916; bh=ss/9lSQ2IAaOl/VvRFx+0WtaQ7qQUsn59sUl4Mz34hY=; h=Date:From:To:In-Reply-To:References:Subject:From; b=DhKA7QafqVr8yRvKw7cp0lrh5Cwt41NOy9CrCV3J5TbKvA1tkLKdLYnVKc3ArJ8Y9 CuCXnnDz2O1gm2xkz474zch1aUnnywSF2gRlVN1DAoxp5yeW5N1+bJh5EebS7FCdi9 lN2MTNVH/tfjPAN02I07oH8Ke6n834Ul+77CH6fYK5VfyHU7TnMzmqCDA0O/rFE5ZV 0VbNWNRPTPmHlEqwVJA1XvYbX7iM8z0t7/0BQY0gqG+CKUiAgiG8pspaQygOifRZOx fS0WM0kbOPl0yhBuF9h1T6Y18+V9yxtiDrit+PzRkNXRMVhyHc9ExdCkCUC5dFu2pQ 8vO6AEI/TcoOA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7352618007E for ; Mon, 26 Jan 2026 16:28:35 +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-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 ; Mon, 26 Jan 2026 16:28:35 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id ACB717A0124 for ; Mon, 26 Jan 2026 11:28:29 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Mon, 26 Jan 2026 11:28:29 -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=fm2; t=1769444909; x=1769531309; bh=4ItyjFHV7lH7vhq07N2hC 1vchHDW+xPsDFKfa/q66Ek=; b=k27fpBV5f2Rt1jhjhkyYgHImrWoNbaoxMEfSB 8zfHEqy97d2AB+Q2z5PucUXu6TaDKQZwaoDeVNxGn0tFYMLOFjZ/S/7L0XDjEMr6 HViPC++ahK7B6m9x+S7SbBZfgXXVnpwkdi3Y3VRHPCIXFvg+LLwQKj6xJ0FLgVnJ /9auviS/FfiMvsszPLAqeUhEc5491FallUDyxdiGvakFs3+7y+xtOAkuZkx3SM7B q9iynRuBiv+kPJy474AeyqeaTdLi0/ZwHNXq/M/0/v6zy6PdpVnakL/+8M3kKNXD 5huEHvZH6WvgTgobM854paFq9+Bjb5RqUtj2r7CMqf0CjgH9w== 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=1769444909; x=1769531309; bh=4 ItyjFHV7lH7vhq07N2hC1vchHDW+xPsDFKfa/q66Ek=; b=FprxtwLAxX2U/zFJx 2DYbH1jothb72gOzutfBtXyhuklVHjyBpt4Bcw0bXrdK2xZRyrIfk9ORI79W30Je mW2aK/hVDn9pzCJxquBcehnt25BQexPujGcbFEbugnc64TClbqYxiEGENwEn2NSG j5lAovxJgK/keNP31jnALOsaWw1guRV96QXAyffWhY7D1x9aky4b8T9MT3fwZ3LL NE35f2xuvq9fmzwAHGOsLMfqNKhbeDRp8Oo7Gb2+v6w1eKPF+bC3yT/EllrNZC5l g0+oj+ebpCCC8Nl8o6xxJYXPdnWCCmUDFkrLdqppbXImE4ziPOQY6RJ6y9XWOa9L /JDmA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduheekudehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeffieeivdfhvdeguddttdegteeiueegvefhteehfeeffeet udeitdehtdegjeeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtghp thhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsh eslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 28B99700065; Mon, 26 Jan 2026 11:28:29 -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: A0wUJIXp2QXJ Date: Mon, 26 Jan 2026 10:28:08 -0600 To: "php internals" Message-ID: In-Reply-To: References: <56dce794-a512-421a-a8d2-91a9692c1ab4@app.fastmail.com> <23093833-bdd2-442d-86b8-9ef492c51ad1@app.fastmail.com> <49cb415d-adb9-408d-82af-b71f6de234ad@varteg.nz> Subject: Re: [PHP-DEV] [RFC] Pattern Matching Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Mon, Jan 26, 2026, at 7:33 AM, Morgan wrote: > On 2026-01-26 23:53, Bruce Weirdan wrote: >>=20 >>=20 >> On Mon, Jan 26, 2026 at 5:48=E2=80=AFAM Morgan > > wrote: >>=20 >> > On 2026-01-26 07:44, Larry Garfield wrote: >> > > >> > > With per-arm, you can opt-in to pattern matching individuall= y, at >> > the cost of having to remember to repeat the keyword on every l= ine.=20 >> > With per-block, you only have to add the keyword once at the co= st of >> > > not being able to selectively use patterns or identity matchi= ng. >> > > >> > > Which tradeoff is better is the option question.=C2=A0 (Ilij= a and I >> > disagree on which to go with.)=C2=A0 Or, if someone can suggest= a way to >> > allow automatic detection reliably, that would also be most wel= come. :-) >> > > >> >=20 >> > If it had to be one or the other [...] >>=20 >>=20 >> Does it have to be one of the other though? Can't we have both? >>=20 > > > > ...so the real question is if "match($foo) is {..." should be add= ed=20 > as a shorthand for when all matching is on patterns. It is technically possible to implement it both ways, I believe. Whethe= r that is too confusing and messy is another question. --Larry Garfield