note 117870 added to language.operators.comparison

From: Date: Mon, 24 Aug 2015 15:49:49 +0000
Subject: note 117870 added to language.operators.comparison
Groups: php.notes 
Request: Send a blank email to php-notes+get-203440@lists.php.net to get a copy of this message
When the comparison rules for the spaceship operator say that for "object<=>anything" the object is always greater, and for "array<=>anything" the array is always greater. The rules should be used in the order they are listed. In the latter case, "anything" means "anything except an object". The former rule says that "object<=>array" will always decide that the object is greater (and evaluate to a positive integer); to be consistent, the comparison "array<=>object" must also always decide that the object is greater (and evaluate to a negative integer). ---- Server IP: 202.78.240.39 Probable Submitter: 122.57.150.248 ---- Manual Page -- http://php.net/manual/en/language.operators.comparison.php Edit -- https://master.php.net/note/edit/117870 Del: integrated -- https://master.php.net/note/delete/117870/integrated Del: useless -- https://master.php.net/note/delete/117870/useless Del: bad code -- https://master.php.net/note/delete/117870/bad+code Del: spam -- https://master.php.net/note/delete/117870/spam Del: non-english -- https://master.php.net/note/delete/117870/non-english Del: in docs -- https://master.php.net/note/delete/117870/in+docs Del: other reasons-- https://master.php.net/note/delete/117870 Reject -- https://master.php.net/note/reject/117870 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203440) next »