Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129490 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 3F7A21A00BC for ; Mon, 1 Dec 2025 21:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764625013; bh=qzvXBMIr4a1T0HVxD/mmjMNbt6Q6LQw2IVnoWWxXsx8=; h=Date:From:To:Subject:From; b=Y2FB2mJ94i36jZgkcviL6Vmvhd6gHe+eMR8ifaQ48N/EwiXWGyAMYsjII6wjgG+9Z UabUpxbrrcLiB7WZeuzlJUaY0PbUXWQFYNNMEFEcvj4j5SJcc5LdWA9fHRffDQBO3W pnBrtIT6c2KHEi8+4uMi547CEc1fHZ3AligaOSKmMrlq1G8c3po68me/borkjGEXvh PtGykC/mXkd/ff2x/dXpbF1kc2Dji1gY46pwf9pOWm0k8LDywHOl/0zLBn1uBIXrXc ZldpDGH6JY9bl5RTM2nYK/2FIKc1/B2WQVYbRNIpTIfF4iAeK9dbdlfx1EbVvIzfge uZEtDiyKeCW0A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0C3F618004C for ; Mon, 1 Dec 2025 21:36:53 +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 fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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, 1 Dec 2025 21:36:52 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 0A7321D001B1 for ; Mon, 1 Dec 2025 16:36:47 -0500 (EST) Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-04.internal (MEProxy); Mon, 01 Dec 2025 16:36:47 -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:message-id :mime-version:reply-to:subject:subject:to:to; s=fm1; t= 1764625006; x=1764711406; bh=PmpmGhSo4bIxujrxKwR7Dtmx2n4gnZmE1Oi t2zp1Y2U=; b=enero2d35eNKR4QErq+tKCQRHvq7aK/pjI3kryD85TkHREuEJgN tZaPV4DDFEX5nxYJjMRJXVed8x3GHctJYJJdRhM/ehEAC+LT+nm6E+rJ6fJRw11y Sd9KOrSNyNRd54grS5sqfqnu5sjzX0X7hhtnig8wYyldYLisiT2k3xptuBRqZDLE 3/nLmTZR4oZ7PJbjm2Lpu6EvjzGuQY+cW2k/91dOuTtbua4ntJ4tlOidJR5+RD0v tiBnkJa3CvNuA2Nw4ru3vF9S0TLb1y/71b4Y+lKgpKusEw75ggReO441UDhfer2C iuP/JRUUH6T7wDgswVIbh9tjmtu/d+Tz1LA== 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:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1764625006; x=1764711406; bh=PmpmGhSo4bIxujrxKwR7Dtmx2n4gnZmE1Oi t2zp1Y2U=; b=es31ee0N+gsUeLr7Yfq25tUqu9BCE5WjYx9xwQ88vnKOW+JfOY2 ZkwxJGJ3BC5eLDqD2HEHjp+V8rcZrWwMhQqNx06b9WS7vn7Y2iN674VsSQ+CzfH5 cv4X/2+Nmf9evDDixByvflC30wNe2c7/8ZUMmkqvTfYO5o+q6JlzWxUPTJ79IdMZ Yx7O8KLrmYE7TjLoTZvSnzdYx3FFrJ9JNGkEJy2UBDleEF/NG+bamwg7jjTuJA0s YuV1MJ2eVcdbwVb7UIJzc37DejVoLdwWwkpbCs9Vcsi/z/9ss2/4cfw3vq+NVe8Z uBOURYQadJLwxWJnidnHEZ8yznvuYp4Ts/w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvheekkedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkufgtgfesthejredtredttdenucfhrhhomhepfdfnrghrrhihucfi rghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqeenuc ggtffrrghtthgvrhhnpeduhfffheffkeeivdegveehleejvdefffejvdfhueeuuddtleej fefgheethefghfenucffohhmrghinhepphhhphdrnhgvthenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlught vggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 697A518C004E; Mon, 1 Dec 2025 16:36:46 -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 Date: Mon, 01 Dec 2025 15:36:21 -0600 To: "php internals" Message-ID: Subject: [PHP-DEV] [RFC] Pattern Matching Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") Hi folks. Ilija and I would like to present our latest RFC endeavor, pattern matching: https://wiki.php.net/rfc/pattern-matching You may note the date on the RFC is from 2020. Yes, we really have had this one in-progress for 5 years. :-) (Though it was inactive for many of those years, in fairness.) Pattern matching was intended as the next follow up to Enums, as it's a stepping stone toward full ADT support. However, we also feel it has enormous benefit on its own for simplifying complex comparisons. This RFC has been through numerous iterations, including a full implementation rewrite just recently that made a number of features much easier. We have therefore included two patterns that were previously slated for later inclusion but turned out to be trivially easy in the new approach. (Variable pinning and numeric comparison.) Nonetheless, there are two outstanding questions on which we are looking for feedback. Naturally given the timing, we will not be calling a vote until at least late January, regardless of how the discussion goes. So, plenty of time to express your support. :-) -- Larry Garfield larry@garfieldtech.com