Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125564 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 EF0FF1A00BD for ; Mon, 16 Sep 2024 13:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1726492224; bh=RJ6om1MA3ktYuE2CIzboulBsIWaL0knRnOZJHP67/S8=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=Wcvo9PmmcKyr1Goh/w7maekOzzzIg/F/IQLb3EJdyRkhnqqZHhRbmnXo87EbYGiW9 lLpne9y8opCPxSi4K4aEW8kP+5tqD9u93RyydDoFLXY/gSHVDziW315UCDhf8fU0nn 4VeloVYIkKlMKF7ljH118IlUNsE9tMu3mcO3F367zAJ+yfK0hgt69BrfSC7/8BbXJR C3YvfJj3VaiGR1drKagKEu8upqUDI18w1Gn0OEYFv2lnhuDzQzB3HW8D36isSuCD9D HsVGPpeBTv8E0OY2XcbfVyBg2IfOLwM1Gh7Sl0ia465IytID93FJ4LBjSzWRi2SBpQ ZirVkUz95Q+Ig== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1CD75180069 for ; Mon, 16 Sep 2024 13:10:23 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (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, 16 Sep 2024 13:10:22 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id C0E8A138025A; Mon, 16 Sep 2024 09:08:16 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-01.internal (MEProxy); Mon, 16 Sep 2024 09:08:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc: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=1726492096; x= 1726578496; bh=RJ6om1MA3ktYuE2CIzboulBsIWaL0knRnOZJHP67/S8=; b=c vJhdhKWaRopnD3tKKPAM0gyD06UzBedeFMxWB9ENtzcyQJ/V3nWSs59c7kgJCoZX rvydYBAc4RnzP+cRaxdKpWCYvKyJ4rKifX1NE3hHPe4y9HA8Hpxa3W50+rdTQCce Z5n51yRfzMOPtxMhEK3zMY1G2Zqaz8kWDQcHUXA5uwnjddEZMAQu6t8Abvt0YrSA qCcS8y+6Ttmo6ZAzNH1E/Rv/kcZVAe0MdGIghAhiRIeyyWWqL5iLixnvqiRWUX5U CztjPowUEhvElAxsrH2q6ffn5YsGF2fbgSHc8Nd61Urauz0QkNLCCDbwFDZvL18N Z2B46DIkYjbMHQMIOHBPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1726492096; x=1726578496; bh=RJ6om1MA3ktYuE2CIzboulBsIWaL 0knRnOZJHP67/S8=; b=QHFYwUeqysZwMEYhqydH6gemG+O5uCne+BprqN21TLo5 7pW7L5nTcKBak2Vo00XxV83q/IjPMWmANFkhEWxOuOx92SuIKSh5ByU3Vx2CsSk7 bowW2QBnHeoloj6nalzkhzGfnsnHuSVsGaO2z1V8/uwMvhFcUqjyD5GqqlFVmp2W K7/oTvwhmqh3m+EHwu3bok743wpnn38xRqzieNqV1+UxKs7DyDbePwCOtP4YcirP 9xGV6tELB8EXU9tCh2TBgJLPqMNnJsc0zCHMFjyNI2n7LKftWzgIKwDiRZCjCkHC xUiVuuZRzXdQLI3Dkku2iWpiMLKxnqvhm7YQRhFOxQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudekhedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegoufhushhpvggtthffohhmrghinhculdegledmnecujfgurhep ofggfffhvfevkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrghnug gvrhhsfdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgvrhhn pefhveetveeuhfejiedthefhveegvddvgfdujeevudekfffhhedvgfffgedvleefffenuc ffohhmrghinhepfehvgehlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprhhosgessghothhtlhgvugdrtghouggvshdpnhgspghrtg hpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhgrrhhrhiesghgr rhhfihgvlhguthgvtghhrdgtohhmpdhrtghpthhtohepjhhorhgurghnrdhlvgguohhugi esghhmrghilhdrtghomhdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhp hhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 50BD2780067; Mon, 16 Sep 2024 09:08:16 -0400 (EDT) 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: Mon, 16 Sep 2024 15:07:55 +0200 To: "Jordan LeDoux" , "Larry Garfield" Cc: "php internals" Message-ID: <4b8c42eb-e1b0-4c20-84bf-1e6faf4659ce@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [Pre-RFC Discussion] User Defined Operator Overloads (again) Content-Type: multipart/alternative; boundary=5b67484ece8f4d5b9b24b7e607099241 From: rob@bottled.codes ("Rob Landers") --5b67484ece8f4d5b9b24b7e607099241 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Sep 16, 2024, at 09:47, Jordan LeDoux wrote: > The reason for this was to prevent developers from creating situations= where `5 > $foo` is true and `5 < $foo` is true.=20 Just to point out: currently, PHP already does nonsensical comparisons: https://3v4l.org/BZfc8 Granted, it is 'technically' correct that ($a <=3D $b || $b <=3D $a) =3D= =3D=3D false; but this really should be an error IMHO instead of a non-l= ogical result. =E2=80=94 Rob --5b67484ece8f4d5b9b24b7e607099241 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Mon, Sep 16,= 2024, at 09:47, Jordan LeDoux wrote:
The reason for this was to prevent developers from creating situations= where `5 > $foo` is true and `5 < $foo` is true.
=

Just to point out: currently, PHP= already does nonsensical comparisons:

=
Granted, it is 'technically' correct that ($a <=3D $b = || $b <=3D $a) =3D=3D=3D false; but this really should be an error IM= HO instead of a non-logical result.

=E2=80=94 Rob
--5b67484ece8f4d5b9b24b7e607099241--