Assignment operatorsThe PHP assignment operator is used to write values to variables. The base assignment operator in PHP is "=".This means that the right-hand copy expression sets the value for the left-hand operand._________________________________
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 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
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,
1, bitwise operatorsThe bitwise operator is used to set the specified bit of an integer number, and if the operand is a string, the ASCII value of the string is manipulated.
Type of operation
Operator
Example
Results
The bitwise operator allows you to set the bits specified in the integer number. If both the left and right arguments are strings, the bitwise operator will manipulate the ASCII value of the character.
//' A ' ^ ' e ' = #4echo 2 ^ "3";
bit operators in the PHP language &, |, ^, ~, 〈〈, 〉〉"&" Bitwise AND operation The bitwise AND operator "&" is the binocular operator. Its function is to participate in the operation of the two number of the corresponding binary phase. Only the
Common operators and operation symbols in php are described in detail .? Php Tutorial * operator number (PHP) operator symbol ** by operator number function is divided into: * 1. arithmetic operator +-* % + -- * 2. string operator. concatenation
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.