Re: [RFC] Strict operators directive
| From: | Benjamin Morel | Date: | Wed, 26 Jun 2019 09:09:49 +0000 |
| Subject: | Re: [RFC] Strict operators directive | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106066@lists.php.net to get a copy of this message | ||
> "120" > "99.9"; // TypeError
> Anything else will bring confusion.
Not sure about this, you can do it the JS way: if both operands are
strings, then it behaves like strcmp():
"23" > "4"; // false
"23" > "221"; // true
I'm not saying that we should do it, but this would not be confusing to me
at all.
Ben