Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70086 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48640 invoked from network); 10 Nov 2013 19:59:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2013 19:59:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=swhitemanlistens-software@cypressintegrated.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=swhitemanlistens-software@cypressintegrated.com; 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:55258] helo=rproxy2-b-iv.figureone.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/11-42270-7A5EF725 for ; Sun, 10 Nov 2013 14:59:36 -0500 Received: from localhost ([216.220.114.66]) by rproxy2-b-iv.figureone.com (Brand New Heavy v1.0) with ASMTP id VER27833 for ; Sun, 10 Nov 2013 11:59:33 -0800 Date: Sun, 10 Nov 2013 14:59:25 -0500 Reply-To: Sanford Whiteman X-Priority: 3 (Normal) Message-ID: <1742604024.20131110145925@cypressintegrated.com> To: Rowan Collins In-Reply-To: <527FE213.3000101@gmail.com> References: <527DF228.1080108@sugarcrm.com> <527F3B9B.8040006@sugarcrm.com> <527F5A95.1030601@sugarcrm.com> <527FE213.3000101@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Comparison and conversion inconsistency - need more info From: swhitemanlistens-software@cypressintegrated.com (Sanford Whiteman) ( -1 < true ) // false, because the two compare equal and the comparison must return a bool ( min( -1,true ) ) // -1, because the two compare equal and -1 was passed first ( min( true,-1 ) ) // true, because the two compare equal and true was passed first Absolutely consistent with documentation. Pay attention to the final return type of a simple comparison vs. comparisons wrapped in the min() function. -- S.