Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/php-static-scanner-instrumentalization.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/nikic/php-parser/test/code/parser/expr/comparison.test')
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/comparison.test107
1 files changed, 107 insertions, 0 deletions
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/comparison.test b/vendor/nikic/php-parser/test/code/parser/expr/comparison.test
new file mode 100644
index 0000000..d5b1e35
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/comparison.test
@@ -0,0 +1,107 @@
+Comparison operators
+-----
+<?php
+$a < $b;
+$a <= $b;
+$a > $b;
+$a >= $b;
+$a == $b;
+$a === $b;
+$a != $b;
+$a !== $b;
+$a <=> $b;
+$a instanceof B;
+$a instanceof $b;
+-----
+array(
+ 0: Expr_BinaryOp_Smaller(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 1: Expr_BinaryOp_SmallerOrEqual(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 2: Expr_BinaryOp_Greater(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 3: Expr_BinaryOp_GreaterOrEqual(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 4: Expr_BinaryOp_Equal(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 5: Expr_BinaryOp_Identical(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 6: Expr_BinaryOp_NotEqual(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 7: Expr_BinaryOp_NotIdentical(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 8: Expr_BinaryOp_Spaceship(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 9: Expr_Instanceof(
+ expr: Expr_Variable(
+ name: a
+ )
+ class: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ )
+ 10: Expr_Instanceof(
+ expr: Expr_Variable(
+ name: a
+ )
+ class: Expr_Variable(
+ name: b
+ )
+ )
+)