Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63786 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14124 invoked from network); 9 Nov 2012 00:47:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Nov 2012 00:47:37 -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 67.192.241.183 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.183 smtp183.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.183] ([67.192.241.183:44799] helo=smtp183.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/11-32758-8A25C905 for ; Thu, 08 Nov 2012 19:47:36 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp8.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id DEF6484C9; Thu, 8 Nov 2012 19:47:32 -0500 (EST) X-Virus-Scanned: OK Received: by smtp8.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id A0EFE8626; Thu, 8 Nov 2012 19:47:32 -0500 (EST) Message-ID: <509C52A4.7030206@sugarcrm.com> Date: Thu, 08 Nov 2012 16:47:32 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Sara Golemon CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Object comparison From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Doc bug? Or code bug? I'm inclined to call it a code bug, but wanted > others' thoughts. I would say comparing object to a number makes little sense, so no reason to define any specific result there. It may be true, false or bologna sandwich. The docs say what happens when the first parameter is object, but say nothing what happens if the second one is object. This is for reason - if you compare object to array, they can't both be greater, something has to take priority. The docs say first arg takes priority. So by docs, comparison of (number, object) has no defined value, while comparison of (object, number) has. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227