Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76738 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68131 invoked from network); 20 Aug 2014 18:37:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2014 18:37:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@mabe.berlin; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@mabe.berlin; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mabe.berlin from 80.237.132.171 cause and error) X-PHP-List-Original-Sender: php@mabe.berlin X-Host-Fingerprint: 80.237.132.171 wp164.webpack.hosteurope.de Received: from [80.237.132.171] ([80.237.132.171:42054] helo=wp164.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/78-29327-9CAE4F35 for ; Wed, 20 Aug 2014 14:36:58 -0400 Received: from dslb-188-102-026-115.188.102.pools.vodafone-ip.de ([188.102.26.115] helo=[192.168.178.30]); authenticated by wp164.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1XKAke-0002E9-O6; Wed, 20 Aug 2014 20:36:53 +0200 Message-ID: <53F4EABD.9020705@mabe.berlin> Date: Wed, 20 Aug 2014 20:36:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: PHP Internals CC: Ferenc Kovacs References: <53F1094B.4040100@mabe.berlin> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;php@mabe.berlin;1408559818;5c54b11b; Subject: Re: [PHP-DEV] [RFC] Binary String Comparison From: php@mabe.berlin (Marc Bennewitz) On 20.08.2014 19:50, Ferenc Kovacs wrote: > > 2014.08.17. 21:59 ezt írta ("Marc Bennewitz" ): >> >> Hi internals! >> >> 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. >> >> As a side effect it makes string comparison much faster and force > developer to really write what they mean (No need to guess) and to force > developers to cast/filter input once which also affects performance. >> >> On C-Level the function zendi_smart_strcmp will be unused and marked > as deprecated. >> >> Thanks, >> Marc >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > Maybe it was already mentionex, but just to make sure: this would fix > issues like https://bugs.php.net/bug.php?id=54547 > Yes, such comparison issues will go away!