Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76784 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34892 invoked from network); 21 Aug 2014 20:58:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2014 20:58:41 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:33329] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/82-22336-08D56F35 for ; Thu, 21 Aug 2014 16:58:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id C523C2400DE; Thu, 21 Aug 2014 16:58:36 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oyzmAKeGICTk; Thu, 21 Aug 2014 16:58:36 -0400 (EDT) Received: from [192.168.0.2] (05439dda.skybroadband.com [5.67.157.218]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 730B72400C3; Thu, 21 Aug 2014 16:58:34 -0400 (EDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <53F1094B.4040100@mabe.berlin> Date: Thu, 21 Aug 2014 21:58:31 +0100 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <7F0C3E23-0EF6-48C1-8D7F-90A2ADF2F353@ajf.me> References: <53F1094B.4040100@mabe.berlin> To: Marc Bennewitz X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Binary String Comparison From: ajf@ajf.me (Andrea Faulds) On 17 Aug 2014, at 20:58, Marc Bennewitz wrote: >=20 > 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): >=20 > https://wiki.php.net/rfc/binary_string_comparison >=20 > 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/