: 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
PHP and php arithmetic operators. PHP arithmetic operators, php arithmetic operator PHP arithmetic operator name description instance result x + y plus x and y and 2 + 24x-y minus x and y difference 5-23x * y multiply x and PHP arithmetic operator,
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._________________________________
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 +
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
PHP Arithmetic Operators, php Arithmetic Operators
PHP Arithmetic Operators
Operator
Name
Description
Instance
Result
X + y
Add
Sum of x and y
2 + 2
4
X-y
Subtraction
Difference between x and
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
What is a string operator? String operator introduction: a string operator is used to concatenate two strings to form a new string. We have introduced the arithmetic operators in PHP operators in the previous sections. I believe you have some
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.