Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76650 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50914 invoked from network); 18 Aug 2014 12:45:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2014 12:45:26 -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:35259] helo=wp164.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/43-31658-265F1F35 for ; Mon, 18 Aug 2014 08:45:24 -0400 Received: from dslb-094-222-180-103.094.222.pools.vodafone-ip.de ([94.222.180.103] helo=[192.168.178.27]); authenticated by wp164.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1XJMJI-0004re-DD; Mon, 18 Aug 2014 14:45:16 +0200 Message-ID: <53F1F534.50109@mabe.berlin> Date: Mon, 18 Aug 2014 14:44:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Sara Golemon CC: PHP internals References: <53F1094B.4040100@mabe.berlin> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;php@mabe.berlin;1408365924;37ab1ca2; Subject: Re: [PHP-DEV] [RFC] Binary String Comparison From: php@mabe.berlin (Marc Bennewitz) On 17.08.2014 22:18, Sara Golemon wrote: > On Sun, Aug 17, 2014 at 12:58 PM, Marc Bennewitz 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 >> > If I understand your goal correctly, you seem to want to change a very > fundamental (and ancient) behavior of the language even though > mechanisms already exist to do what you describe as the "changed > behavior". > > What exactly is wrong with ===, strcmp(), etc..? The question isn't "What's wrong with ===, strcmp()?" but "What's wrong with ==, <, >?". We have a standard way to compare two operands but currently we do some magic things to solve something that don't need to be solved. If you would like to compare two pears we currently convert the pears into apples and compare two apples and say please use a special function to compare two pears. Why? There is no numeric context to compare two strings numerically. > > -Sara >