: 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
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
Php's comparison operators include (equal to) loose comparison and (totally equal to) strict comparison, which introduces many interesting questions. This article will explain the security of php comparison operators for you, related Resources for
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
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._________________________________
Comparison Operators and logical operators may be used in models, operations, and templates of ThinkPHP. some of them can directly use PHP operators, while some must use ThinkPHP-specific operators. Beginners are often confused about this. This
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 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.