There are many types of PHP operators. Among all of them, Arithmetic Operators, Assignment Operators, Comparison Operators are main and important as well. Find out the detail description about the above operators.
There are following arithmetic operators supported by PHP language:
For example: variable A equal to 10 and variable B equal tos 20 then:
Top Three PHP Operators
Arithmetic Operators :-There are following arithmetic operators supported by PHP language:
For example: variable A equal to 10 and variable B equal tos 20 then:
Example of Arithmetic Operator :-
Check out the output below :-
16
4
60
1.6666666666667
4
11
9
Assignment Operators :-
There are following assignment operators supported by PHP language:
Example :-
Output :-
10
70
25
30
5
3
Comparison Operators :-
There are following comparison operators supported by PHP language
Assume variable A holds 10 and variable B holds 20 then:
Example of Comparison Operators :-
Output:-
bool(true)
bool(false)
bool(false)
bool(true)
bool(false)
bool(true)
0 comments:
Post a Comment