On 17 Aug 2014, at 20:58, Marc Bennewitz <php@mabe.berlin> wrote:

> 
> I've created a draft RFC and patch to change the behavior of non-strict 
> string to string comparison to be binary safe (as the strict comparison 
> operator does):
> 
>     https://wiki.php.net/rfc/binary_string_comparison
> 
> On comparing two numeric strings both operands will be equal if the string 
> representation will be the same. On comparing two numeric strings the first 
> operand will be greater if the first not matching byte will be higher. On 
> comparing two numeric strings the first operand will be lower if the first 
> not matching byte will be lower.

I might as well point out that I am also not in favour of this. In PHP, we 
*usually* do the Perl-like thing and pretend ints, floats and numeric strings 
are the same. This RFC reduces the extent to which we do that, meaning PHP 
would be less consistent. For that reason, I cannot support it.

--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to