We've explained PHP arithmetic operators, PHP string operators, assignment operators, and today we'll give you a detailed introduction to the PHP operator
"bitwise operator"。
Bit operators are not often used in PHP, but they are still very useful,
Example of bitwise and bitwise OR operation in PHP. Bitwise and operations are mainly performed on binary numbers. The code is as follows :? Php $ a1; $ b2; $ c $ a ^ B; echo $ c3? Here, we do not simply convert the addition relationship decimal 1
Bitwise operators allow you to evaluate and manipulate the bits specified in the integer number.
Bitwise operators
Example name result
$a & $b and (bitwise AND) will set the 1 bit in the $a and $b to 1.
$a | $b or (bitwise OR) sets any bit in the
**& bitwise AND, same as unchanged, otherwise all counted as 0| Bitwise OR,^ Bitwise XOR, not the same is counted as 1**PHP bitwise AND OR (^, &) operation is also a very common logic to determine the type, there are many new PHP novice may not be
Bitwise and operations are mainly performed on binary numbers. The following describes the bitwise AND and/or operations in PHP, we hope to help you with bitwise and binary operations.
The code is as follows:
The code is as follows:
$ A = 1;$
Bitwise and operations are mainly performed on binary numbers. The following describes the bitwise AND and/or operations in PHP, we hope to help you with bitwise and binary operations.
The code is as follows:
The code is as follows:
$ A = 1
When I was engaged in PHP, I found that the | and & operators are very clever. I would like to share with you this article.
Bitwise operator | and & Simplified checkbox check box access value. Set the name attribute of the checkbox to name =
Analysis of PHP bitwise and or (^, & amp ;). Today, a friend in the group asked a question about bitwise and OR .. I have been working in PHP for a year. maybe I am not familiar with this part. here I will introduce this part to new users. I am
Bitwise operatorsBitwise operators are operations that align bits from low to high.
symbols
function
Example
Personal Understanding
&
Bitwise-AND
$m & $n
Full 1 is 1, otherwise 0
I. Six operators in C language:
& Bitwise AND
| By bit or
^ Bitwise OR
~ Invert
> Right shift
1. bitwise AND OPERATION
Bitwise AND operator "&" are binary operators.
Its function is the binary phase corresponding to the two numbers involved in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.