note 88511 added to language.operators.bitwise
| From: | BenDavies at osu1 dot php dot net | Date: | Tue, 27 Jan 2009 15:46:59 +0000 |
| Subject: | note 88511 added to language.operators.bitwise | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149846@lists.php.net to get a copy of this message | ||
I really hate this description:
$a << $b Shift left Shift the bits of $a $b steps to the left (each step means
"multiply by two")
$a >> $b Shift right Shift the bits of $a $b steps to the right (each step means
"divide by two"
I prefer:
syntax description result
$a << $b Shift left $a = $a * 2^$b
$a >> $b Shift right $a = $a / 2^$b
In my example, "^" means "to the power of", not Xor.
----
Server IP: 92.48.74.199
Probable Submitter: 195.59.170.200
----
Manual Page -- http://www.php.net/manual/en/language.operators.bitwise.php
Edit -- https://master.php.net/note/edit/88511
Del: integrated -- https://master.php.net/note/delete/88511/integrated
Del: useless -- https://master.php.net/note/delete/88511/useless
Del: bad code -- https://master.php.net/note/delete/88511/bad+code
Del: spam -- https://master.php.net/note/delete/88511/spam
Del: non-english -- https://master.php.net/note/delete/88511/non-english
Del: in docs -- https://master.php.net/note/delete/88511/in+docs
Del: other reasons-- https://master.php.net/note/delete/88511
Reject -- https://master.php.net/note/reject/88511
Search -- https://master.php.net/manage/user-notes.php