Operators
in PHP
Operator is a symbol which is used to perform
mathematical and logical operations in the programing languages. Different
types of operator in PHP are:
1. Arithmetic operators,
2. Assignment operators,
3. Comparison operators,
4. Increment/Decrement operators,
5. Logical operators, and
6. String operators.
The arithmetic operators in PHP perform general
arithmetical operations, such as addition, subtraction, multiplication and
division etc. Refer Table 4.1.
Assignment operators are performed with numeric
values to store a value to a variable. The default assignment operator is “=”.
This operator sets the left side operant value of expression to right side
variable. Refer Table 4.2.
Comparison operators perform an action to compare two values. These values may contain integer or string data types (Number or Strings). Refer Table 4.3.
Increment and decrement operators are used to
perform the task of increasing or decreasing variable’s value. This operator is
mostly used during iterations in the program logics. Refer Table 4.4.
Logical Operators are used to combine conditional
statements. Refer Table 4.5.
Two operators are used to perform string related
operations such as Concatenation and Concatenation assignment (Appends). Refer
Table 4.6.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.