Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126289 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 qa.php.net (Postfix) with ESMTPS id 326821A00BC for ; Tue, 4 Feb 2025 21:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1738704192; bh=TRWtMhjH2qJsNqqqH5jr0GOKMxkCQQ26aWLKCcwzTbM=; h=Date:From:To:In-Reply-To:References:Subject:From; b=E5BTGMOmbbiX0Ri6h9K2mD2Bg9gOuum3mZLXYVd7P3k9NVDA7GCFtjHEvgX7nxXrU rrMVy4JeXfkUbavJuWRtuyAorz2qL07p2Au4O3qx07ORB46x3zP/JIVluXQgTZIcgs WIJUZqfeQi20Ht5E5U2glYZ7oqBQRKey4GivWzoIkNI3EWB2TyqhAYMewXKv/oUeV4 TqebCb4zODTmAdaqX7hyiWbEj4vRgcidT8Dpv4fsiauKIwNBiIVuRgYHVVmILKGPz4 YTyea7C4+OERvojdvtfro3o2F393dEphNb3sJw/kykPDMn8LTPB89G01MoHStis7j3 99kzfOL746SNw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 82253180087 for ; Tue, 4 Feb 2025 21:23:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_20,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.0 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 ; Tue, 4 Feb 2025 21:23:10 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 262EC1140190 for ; Tue, 4 Feb 2025 16:25:55 -0500 (EST) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-01.internal (MEProxy); Tue, 04 Feb 2025 16:25:55 -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=fm3; t=1738704355; x=1738790755; bh=/D1+FxcO+Gzmmkbe2X2WA g7flYddLJ3GoZ4jMqdmVm0=; b=vVfqhmseFPgHgCKwwfOutarD7M5ZwJ/qy4neE TwfU4OBdxC5nVMFV5AygZPDv8Vb1mKtteGW7Kdw6iYp7TswDSGYCKVg0QgUuSqqi 1IdeVFLsRknYYSZ49mC5rH+r9HFi0LPNyGXUuRKCPlH3S+spiBq9p3CZohKe+aWa mOKnKAA4bKNPQN5aVE5F0m/gYiFe5SBDEer4XIsrbN3LItmQx1oPe+1jWLrPMmrN YiYeqhx/+CjSwxiF10i1OJafqvAgogDNQ46gePDddEzguXIvSe7ZcN0dUt7SoV69 5aV4p2wSpmEij+LjvIOH3mfrnS2SD1iYl+1RSVFvCRVXYsu3g== 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=fm3; t=1738704355; x=1738790755; bh=/ D1+FxcO+Gzmmkbe2X2WAg7flYddLJ3GoZ4jMqdmVm0=; b=b3TsUFc31MER26Olz u7z9VVIaC2y7geqJKYGPVMHUWF0ELKBUIq6lXp0ItyzZKDnDyWeueP1c5SaVEiA5 j1UnLXd88M+lb6MKph82VFu3Z2U5/BbD/27Tn0ypmE6lySzB5J+0OiXYf7qpJU2G eE87ISKB5llpfg/X8tJXNkxWLXb8BOFh6xjr0nF+UcI8rJyrYIFBx5vCDs9XXwza Qw2Ws3yol4gU/5sFLAUBNfISqon41Ei2/FcwKXL9enMQDjUEsGTKcXrYcpCZT6vD Pcuo2oZC7mkv6OghnYxRxAV0qyB6iA04uy9M2TOCkmnRgdDX9GeprjJvA/u1/oFz pjYOA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefoggffhffvkfgjfhfutgfgsehtjeertdertddt necuhfhrohhmpedfnfgrrhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfh hivghlughtvggthhdrtghomheqnecuggftrfgrthhtvghrnhepudegvdelgfeugeehfeej teffudevleethfefgeejffffleegtddtveekgeekudfgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgv tghhrdgtohhmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtph htthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id C300629C006F; Tue, 4 Feb 2025 16:25:54 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 04 Feb 2025 15:25:34 -0600 To: "php internals" Message-ID: <44a1b868-4f11-4e60-a7a2-3bdcb95617f8@app.fastmail.com> In-Reply-To: <3bb77a10-f716-4729-9bc4-4b87772598a5@app.fastmail.com> References: <25b1011b-b2c4-4f5c-8e83-694c59ee29eb@mabe.berlin> <3bb77a10-f716-4729-9bc4-4b87772598a5@app.fastmail.com> Subject: Re: [PHP-DEV] Pattern matching details questions Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Tue, Feb 4, 2025, at 3:16 PM, Larry Garfield wrote: > Patterns are deliberately designed as a superset of existing DNF types. > You can already have a type of Foo&Bar, so we want the pattern for > "instanceof Foo || instanceof Bar" to be the same. That means & and | > for conjunctions is necessary. Also supporting "and" and "or" would > technically be possible, but wouldn't resolve the issue (since & would > still be needed either way) and would just add more complication, > confusion, and inconsistency. I don't think that's viable. And that of course should be "$x instanceof Foo && $x instanceof Bar" in the equivalent example. My bad. (Though the point applies for |, ||, or, just the same.) --Larry Garfield