note 118443 added to migration70.new-features
| From: | Anonymous | Date: | Mon, 07 Dec 2015 10:54:55 +0000 |
| Subject: | note 118443 added to migration70.new-features | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204296@lists.php.net to get a copy of this message | ||
The key difference between the spaceship operator and the sign function is that the sign function
returns the sign of a single value or expression, while the spaceship <=> returns, in a single
operation, the results of the <, <=, ==, !=, >= and > operators aplied to the same pair
of values or expressions. It also differ from sgn(a - b) in that it doesn't require the
subtraction to be valid, in range or well defined. For example (largestnum <=> -largestnum)
is valid while sgn(largestnum - (-largestnum)) involves a numeric overflow in the subtraction.
----
Server IP: 72.52.91.14
Probable Submitter: 2a01:4f0:4018:f0:fabc:12ff:fe78:9014
----
Manual Page -- http://php.net/manual/en/migration70.new-features.php
Edit -- https://master.php.net/note/edit/118443
Del: integrated -- https://master.php.net/note/delete/118443/integrated
Del: useless -- https://master.php.net/note/delete/118443/useless
Del: bad code -- https://master.php.net/note/delete/118443/bad+code
Del: spam -- https://master.php.net/note/delete/118443/spam
Del: non-english -- https://master.php.net/note/delete/118443/non-english
Del: in docs -- https://master.php.net/note/delete/118443/in+docs
Del: other reasons-- https://master.php.net/note/delete/118443
Reject -- https://master.php.net/note/reject/118443
Search -- https://master.php.net/manage/user-notes.php