php-parser/test/code/parser/expr/comparison.test

98 lines
1.7 KiB
Plaintext
Raw Normal View History

2011-11-27 11:20:35 +01:00
Comparison operators
-----
<?php
$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(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
1: Expr_BinaryOp_SmallerOrEqual(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
2: Expr_BinaryOp_Greater(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
3: Expr_BinaryOp_GreaterOrEqual(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
4: Expr_BinaryOp_Equal(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
5: Expr_BinaryOp_Identical(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
6: Expr_BinaryOp_NotEqual(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
7: Expr_BinaryOp_NotIdentical(
2011-11-27 11:20:35 +01:00
left: Expr_Variable(
name: a
)
right: Expr_Variable(
name: b
)
)
8: Expr_Instanceof(
expr: Expr_Variable(
name: a
)
class: Name(
parts: array(
0: B
)
)
)
9: Expr_Instanceof(
expr: Expr_Variable(
name: a
)
class: Expr_Variable(
name: b
)
)
)