Re: Object comparison

From: Date: Fri, 09 Nov 2012 00:47:32 +0000
Subject: Re: Object comparison
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-63786@lists.php.net to get a copy of this message
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

« previous php.internals (#63786) next »