What is an Operator in PHP ?

The basic function of an operator is to do something with the value of a variable. That “something” can be to assign a value, change a value, or compare two or more values. Assignment operator ( = ) to assign values to your variables. There are other types of assignment operators, as well as other types of operators in general.

Here are the main types of PHP operators:

Assignment operators : Assign values to variables. Can also add to or subtract from a variable’s current value.

Arithmetic operators : Addition, subtraction, division, and multiplication occur when these operators are used.

Comparison operators : Compare two values and return either true or false. You can then perform actions
based on the returned value.

Logical operators : Determine the status of conditions

No comments:

Post a Comment