: Operators in PHP --- arithmetic operators, logical operators, value assignment operators, and comparison operators: 1. arithmetic operators common arithmetic operators calculation type operators example result calculation inverse operations -- $ a
Operators in PHP --- Arithmetic Operators, logical operators, value assignment operators, comparison operators, and operator assignment
1. Arithmetic Operators
Common Arithmetic Operators
Operation Type
Operator
Example
Result
1. Arithmetic operators
Common arithmetic operators
Type of operation
Operator
Example
Results
Take inverse operation
-
-$a
Returns a negative value of $ A
Addition operation
+
$a +
PHP reading notes (4)-Operators, PHP reading notes operators
What is an operator
What is an operator? The operator is an identifying symbol that tells PHP to do the related operations. For example, you need to calculate how much 123 times 456
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._________________________________
PHP assignment operator The PHP assignment operator is used to write values to variables. The base assignment operator in PHP is "=". This means that the right-hand assignment expression sets the value for the left-hand operand.
The value of the
The basic assignment operator is "=". At first you might think it's "equal", not really. It actually means assigning the value of the right expression to the left operand.
The value of the assignment expression is the value assigned. In other words,
What is an operator What is an operator? The operator is an identifying symbol that tells PHP to do the related operations. For example, you need to calculate how much 123 times 456 equals, then you need a symbol to tell the server that you need to
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.