note 124622 added to migration70.new-features
| From: | AdrianWiik@php.net | Date: | Thu, 16 Jan 2020 13:52:11 +0000 |
| Subject: | note 124622 added to migration70.new-features | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-213890@lists.php.net to get a copy of this message | ||
A good rule of thumb for remembering what the spaceship operator expression returns is to replace
the spaceship operator with a minus sign (-). If the result is negative, 0 or positive, the
expression will return -1, 0 or 1 respectively.
Example:
<?php
echo 5 <=> 8; // 5 - 8 = -3, prints -1
echo 2 <=> 2; // 2 - 2 = 0, prints 0
echo 4 <=> 2; // 4 - 2 = 2, prints 1
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.168 (proxied: 62.50.172.211)
----
Manual Page -- http://php.net/manual/en/migration70.new-features.php
Edit -- https://master.php.net/note/edit/124622
Del: integrated -- https://master.php.net/note/delete/124622/integrated
Del: useless -- https://master.php.net/note/delete/124622/useless
Del: bad code -- https://master.php.net/note/delete/124622/bad+code
Del: spam -- https://master.php.net/note/delete/124622/spam
Del: non-english -- https://master.php.net/note/delete/124622/non-english
Del: in docs -- https://master.php.net/note/delete/124622/in+docs
Del: other reasons-- https://master.php.net/note/delete/124622
Reject -- https://master.php.net/note/reject/124622
Search -- https://master.php.net/manage/user-notes.php