From 7b913e80b176ac93a99cf435acfcb3aa4e091957 Mon Sep 17 00:00:00 2001 From: Chauhan1712 Date: Mon, 17 Oct 2022 10:39:14 +0530 Subject: [PATCH] operators --- ashu/operators.php | 225 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 ashu/operators.php 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 +?> +
+ +
+ + +