Wednesday, November 26, 2014

Get Acknowledgement of Top Three PHP Operators

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.

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:

Arithmetic Operators

Example of Arithmetic Operator :-
Arithmetic Operators Example
Check out the output below :-

16
4
60
1.6666666666667
4
11
9

Assignment Operators :-

There are following assignment operators supported by PHP language:

Assignment Operators

Example :-
Assignment Operators Example

Output :-

10
70
25
30
5

Comparison Operators :-

There are following comparison operators supported by PHP language
Assume variable A holds 10 and variable B holds 20 then:

Comparison Operators

Example of Comparison Operators :-

Comparison Operators Example

Output:-

bool(true)
bool(false)
bool(false)
bool(true)
bool(false)
bool(true)

0 comments:

Post a Comment