
Identical : if both operands are equal and are of the same type then result become True. Not equal to : if the both operands are unequal then result become True. Greater than or equal to: If left operands is greater than or equal to the right then result become True. Greater than: Result become True when left operand is greater than the right. Logical OR: If either of the operand is true then result become true otherwise false.Ĭomparison Operators used to compare two elements and outputs the result in boolean form. Logical AND: If the both operands are true then result become true otherwise false. And if both are same then result become false. Logical XOR: If either of the operand is true then become true.

otherwise anyone operand is false then result become false. Logical NOT: If both operands are true then result become true. Logical OR: If one operand true or another is false then result become true If anyone operand is false then result become false Logical AND: If both the operands are true then result become true. Then the value of the conditions is used to determine the overall value of the operand1 operator operand2. Each operand is considered a condition that can be evaluated to a true or false value. Logical operators allow a program to make a decision based on multiple conditions. Note : The exponentiation has been introduced in PHP 5.6.Įxample of arithmetic operator in PHP: " Modulus : divides first operand by second operand and returns remainderĮxponentiation (power): returns first raised to power second Operatorĭivision: divides the first operand by the second The arithmetic operators are use to perform mathematical operations like addition, subtraction, multiplication etc. PHP supports various types of operations like arithmetic operations (addition, subtraction, etc), logical operations (AND, OR, etc), etc. It takes two values 5 and 2, performs subtraction operation on them to give 5.

For example, “5 – 2 = 3” in this example ‘-’ is an operator. Operators are used to perform operations on variables or values. PHP Operator is used to perform some operation on operands.
