Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70067 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37745 invoked from network); 9 Nov 2013 08:28:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Nov 2013 08:28:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.99 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.99 smtp99.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.99] ([108.166.43.99:56594] helo=smtp99.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/00-37676-C22FD725 for ; Sat, 09 Nov 2013 03:28:28 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 6FDD61B01D9; Sat, 9 Nov 2013 03:28:25 -0500 (EST) X-Virus-Scanned: OK Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 12DBE1B01BD; Sat, 9 Nov 2013 03:28:24 -0500 (EST) Message-ID: <527DF228.1080108@sugarcrm.com> Date: Sat, 09 Nov 2013 00:28:24 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Yasuo Ohgaki , "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Comparison and conversion inconsistency - need more info From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I was surprised that wired min() behavior. > The cause of this behavior is in Zend API. > > https://bugs.php.net/bug.php?id=53104 > > So I've made FRC to discuss/document/fix such behavior. > > If anyone know such behavior, please let me know so that I can write them > in the RFC. In the engine, null is less than -1. Changing it would be a very profound compatibility break, so I do not think it can be done in any 5.x version. Current behavior is described here in detail: http://php.net/manual/en/language.operators.comparison.php Null is the same as false in this case, which is less than any non-false value. -1 is a non-false value. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227