diff --git a/ashu/operators.php b/ashu/operators.php new file mode 100644 index 0000000..f82534b --- /dev/null +++ b/ashu/operators.php @@ -0,0 +1,225 @@ + + + +
+
+

Arithmetic Operators


+

Addition

+ +
+ +

Subtraction

+ +
+ +

Multiplication

+ +
+ +

Division

+ +
+ +

Modulus

+ +
+ + +

Exponentiation

+ +
+
+ +
+

Assignment Operators


+

x = y

+ +
+ +

Addition

+ +
+ +

Subtraction

+ +
+ +

Multiplication

+ +
+ +

Division

+ +
+ +

Modulus

+ +
+
+ +
+

Comparison Operators


+

Equal

+ +
+ +

Identical

+ +
+ +

Not Equal

+ +
+ +

Not Equal

+ $y); // returns false because values are equal +?> +
+ +

Not identical

+ +
+ +

Greater than

+ $y); // returns true because $x is greater than $y +?> +
+ +

Less than

+ +
+ +

Greater than or equal to

+= $y); // returns true because $x is greater than or equal to $y +?> +
+ +

Less than or equal to

+ +
+ +

Spaceship

+ $y); // returns -1 because $x is less than $y +echo "
"; + +$x = 10; +$y = 10; + +echo ($x <=> $y); // returns 0 because values are equal +echo "
"; + +$x = 15; +$y = 10; + +echo ($x <=> $y); // returns +1 because $x is greater than $y +?> +
+ +
+ + +