Re: Re: [RFC] Permit trailing whitespace in numeric strings
| From: | Benjamin Morel | Date: | Tue, 26 Mar 2019 21:54:54 +0000 |
| Subject: | Re: Re: [RFC] Permit trailing whitespace in numeric strings | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-104960@lists.php.net to get a copy of this message | ||
On Tue, 26 Mar 2019 at 21:33, Theodore Brown <theodorejb@outlook.com> wrote:
var_export("50" == " 50"); // true
>
I almost had a heart attack after running this code. I knew that PHP had a
few quirks when comparing different types, but I had long taken for granted
that comparing 2 *strings *performed a byte-by-byte comparison.
I also strongly support fixing the current quirk, rather than extending it.
Ben