comparison.test 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. Comparison operators
  2. -----
  3. <?php
  4. $a < $b;
  5. $a <= $b;
  6. $a > $b;
  7. $a >= $b;
  8. $a == $b;
  9. $a === $b;
  10. $a != $b;
  11. $a !== $b;
  12. $a instanceof B;
  13. $a instanceof $b;
  14. -----
  15. array(
  16. 0: Expr_Smaller(
  17. left: Expr_Variable(
  18. name: a
  19. )
  20. right: Expr_Variable(
  21. name: b
  22. )
  23. )
  24. 1: Expr_SmallerOrEqual(
  25. left: Expr_Variable(
  26. name: a
  27. )
  28. right: Expr_Variable(
  29. name: b
  30. )
  31. )
  32. 2: Expr_Greater(
  33. left: Expr_Variable(
  34. name: a
  35. )
  36. right: Expr_Variable(
  37. name: b
  38. )
  39. )
  40. 3: Expr_GreaterOrEqual(
  41. left: Expr_Variable(
  42. name: a
  43. )
  44. right: Expr_Variable(
  45. name: b
  46. )
  47. )
  48. 4: Expr_Equal(
  49. left: Expr_Variable(
  50. name: a
  51. )
  52. right: Expr_Variable(
  53. name: b
  54. )
  55. )
  56. 5: Expr_Identical(
  57. left: Expr_Variable(
  58. name: a
  59. )
  60. right: Expr_Variable(
  61. name: b
  62. )
  63. )
  64. 6: Expr_NotEqual(
  65. left: Expr_Variable(
  66. name: a
  67. )
  68. right: Expr_Variable(
  69. name: b
  70. )
  71. )
  72. 7: Expr_NotIdentical(
  73. left: Expr_Variable(
  74. name: a
  75. )
  76. right: Expr_Variable(
  77. name: b
  78. )
  79. )
  80. 8: Expr_Instanceof(
  81. expr: Expr_Variable(
  82. name: a
  83. )
  84. class: Name(
  85. parts: array(
  86. 0: B
  87. )
  88. )
  89. )
  90. 9: Expr_Instanceof(
  91. expr: Expr_Variable(
  92. name: a
  93. )
  94. class: Expr_Variable(
  95. name: b
  96. )
  97. )
  98. )