菜谱项目

comparison.test 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 <=> $b;
  13. $a instanceof B;
  14. $a instanceof $b;
  15. -----
  16. array(
  17. 0: Expr_BinaryOp_Smaller(
  18. left: Expr_Variable(
  19. name: a
  20. )
  21. right: Expr_Variable(
  22. name: b
  23. )
  24. )
  25. 1: Expr_BinaryOp_SmallerOrEqual(
  26. left: Expr_Variable(
  27. name: a
  28. )
  29. right: Expr_Variable(
  30. name: b
  31. )
  32. )
  33. 2: Expr_BinaryOp_Greater(
  34. left: Expr_Variable(
  35. name: a
  36. )
  37. right: Expr_Variable(
  38. name: b
  39. )
  40. )
  41. 3: Expr_BinaryOp_GreaterOrEqual(
  42. left: Expr_Variable(
  43. name: a
  44. )
  45. right: Expr_Variable(
  46. name: b
  47. )
  48. )
  49. 4: Expr_BinaryOp_Equal(
  50. left: Expr_Variable(
  51. name: a
  52. )
  53. right: Expr_Variable(
  54. name: b
  55. )
  56. )
  57. 5: Expr_BinaryOp_Identical(
  58. left: Expr_Variable(
  59. name: a
  60. )
  61. right: Expr_Variable(
  62. name: b
  63. )
  64. )
  65. 6: Expr_BinaryOp_NotEqual(
  66. left: Expr_Variable(
  67. name: a
  68. )
  69. right: Expr_Variable(
  70. name: b
  71. )
  72. )
  73. 7: Expr_BinaryOp_NotIdentical(
  74. left: Expr_Variable(
  75. name: a
  76. )
  77. right: Expr_Variable(
  78. name: b
  79. )
  80. )
  81. 8: Expr_BinaryOp_Spaceship(
  82. left: Expr_Variable(
  83. name: a
  84. )
  85. right: Expr_Variable(
  86. name: b
  87. )
  88. )
  89. 9: Expr_Instanceof(
  90. expr: Expr_Variable(
  91. name: a
  92. )
  93. class: Name(
  94. parts: array(
  95. 0: B
  96. )
  97. )
  98. )
  99. 10: Expr_Instanceof(
  100. expr: Expr_Variable(
  101. name: a
  102. )
  103. class: Expr_Variable(
  104. name: b
  105. )
  106. )
  107. )