PHP Programming
COMP203TH
Lecture: 6
PHP Operators
(Note:-Check video lecture for examples)
Arithmetic Operators:
PHP supports all standard arithmetic operations:
Comparison Operators:
Various Comparison(relational) operators in PHP are:
PHP Assignment Operators:
The assignment operators are used to assign value to different variables. The
basic assignment operator is “=”.
PHP Incrementing/Decrementing Operators:
The increment and decrement operators are used to increase and
decrease the value of a variable.
PHP Logical Operators:
String Operators:
The string operators are used to perform the operation on strings. There are
two string operators in PHP:
PHP Ternary Operator:
PHP Bitwise Operators:
The bitwise operators are used to perform bit-level operations on the operands.
The operands are first converted to bit-level and then calculation is performed
on the operands.
The mathematical operations such as addition, subtraction, multiplication etc
can be performed at bit-level for faster processing.