Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70076 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6534 invoked from network); 10 Nov 2013 09:20:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2013 09:20:22 -0000 Authentication-Results: pb1.pair.com header.from=swhitemanlistens-software@cypressintegrated.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=swhitemanlistens-software@cypressintegrated.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cypressintegrated.com designates 173.1.104.101 as permitted sender) X-PHP-List-Original-Sender: swhitemanlistens-software@cypressintegrated.com X-Host-Fingerprint: 173.1.104.101 rproxy2-b-iv.figureone.com Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from [173.1.104.101] ([173.1.104.101:64723] helo=rproxy2-b-iv.figureone.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/E0-02577-5DF4F725 for ; Sun, 10 Nov 2013 04:20:22 -0500 Received: from localhost ([216.220.114.66]) by rproxy2-b-iv.figureone.com (Brand New Heavy v1.0) with ASMTP id VUE45419 for ; Sun, 10 Nov 2013 01:20:19 -0800 Date: Sun, 10 Nov 2013 04:20:11 -0500 Reply-To: Sanford Whiteman X-Priority: 3 (Normal) Message-ID: <1405494113.20131110042011@cypressintegrated.com> To: Yasuo Ohgaki In-Reply-To: References: <527DF228.1080108@sugarcrm.com> <527F3B9B.8040006@sugarcrm.com> <905797983.20131110040719@cypressintegrated.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Comparison and conversion inconsistency - need more info From: swhitemanlistens-software@cypressintegrated.com (Sanford Whiteman) > > ----------------------------------- > > if (-1 < NULL) > > =C2=A0 echo 'NULL is smaller'; > > else > > =C2=A0 echo '-1 is smaller'; > > ----------------------------------- > > returns '-1 is smaller' as all of us expects. > =20 > Please go over the conditions and the echos in this example one more > time. > I think I understand your argument as I know languages that treat null/ni= l as special value. > I just think=C2=A0 My argument in the above case is that the "friendly text" you are echoing is wrong -- backwards. > min(-10000, -1000, -100, NULL, 100, 1000) returns NULL. > is not following standard PHP comparison rules. =20 It is. Never mind the 6 different vars, as the sort runs, it boils down to -10000 < NULL =20 (bool)-10000 < (bool)NULL =20 true < false =20 --> false =20