Re: [RFC brainstorm] Approximately equals operator
| From: | Jordi Boggiano | Date: | Wed, 02 Apr 2025 07:33:27 +0000 |
| Subject: | Re: [RFC brainstorm] Approximately equals operator | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127024@lists.php.net to get a copy of this message | ||
On 01.04.2025 00:03, Niels Dossche wrote:
We live in an imperfect world, and we often approximate data, but neitherI am late to the party here, but in all seriousness when I read the subject my initial thought was that this was gonna be about adding a ~= operator to clearly show intent (does the same as == though), allowing us to simultaneously deprecate ==. Then in next major we can make == mean strict equal, deprecate ===, and you're left with == or ~=, which seems cleaner to me as you know nobody typed ~= accidentally while they meant ===. Anyway, while (maybe..) a less goofy idea it is probably just as unlikely to make it through BC concerns. Best, Jordi==nor===are ideal comparison operators to deal with these kinds of data.