Re: [Pre-RFC Discussion] User Defined Operator Overloads (again)
| From: | Rob Landers | Date: | Mon, 16 Sep 2024 13:07:55 +0000 |
| Subject: | Re: [Pre-RFC Discussion] User Defined Operator Overloads (again) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125564@lists.php.net to get a copy of this message | ||
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:
https://3v4l.org/BZfc8
Granted, it is 'technically' correct that ($a <= $b || $b <= $a) === false; but this
really should be an error IMHO instead of a non-logical result.
— Rob