simple.test 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. Class declaration
  2. -----
  3. <?php
  4. class A extends B implements C, D {
  5. const A = 'B', C = 'D';
  6. public $a = 'b', $c = 'd';
  7. protected $e;
  8. private $f;
  9. public function a() {}
  10. public static function b() {}
  11. public final function c() {}
  12. protected function d() {}
  13. private function e() {}
  14. }
  15. -----
  16. array(
  17. 0: Stmt_Class(
  18. type: 0
  19. extends: Name(
  20. parts: array(
  21. 0: B
  22. )
  23. )
  24. implements: array(
  25. 0: Name(
  26. parts: array(
  27. 0: C
  28. )
  29. )
  30. 1: Name(
  31. parts: array(
  32. 0: D
  33. )
  34. )
  35. )
  36. stmts: array(
  37. 0: Stmt_ClassConst(
  38. consts: array(
  39. 0: Const(
  40. name: A
  41. value: Scalar_String(
  42. value: B
  43. )
  44. )
  45. 1: Const(
  46. name: C
  47. value: Scalar_String(
  48. value: D
  49. )
  50. )
  51. )
  52. )
  53. 1: Stmt_Property(
  54. type: 1
  55. props: array(
  56. 0: Stmt_PropertyProperty(
  57. name: a
  58. default: Scalar_String(
  59. value: b
  60. )
  61. )
  62. 1: Stmt_PropertyProperty(
  63. name: c
  64. default: Scalar_String(
  65. value: d
  66. )
  67. )
  68. )
  69. )
  70. 2: Stmt_Property(
  71. type: 2
  72. props: array(
  73. 0: Stmt_PropertyProperty(
  74. name: e
  75. default: null
  76. )
  77. )
  78. )
  79. 3: Stmt_Property(
  80. type: 4
  81. props: array(
  82. 0: Stmt_PropertyProperty(
  83. name: f
  84. default: null
  85. )
  86. )
  87. )
  88. 4: Stmt_ClassMethod(
  89. type: 1
  90. byRef: false
  91. params: array(
  92. )
  93. stmts: array(
  94. )
  95. name: a
  96. )
  97. 5: Stmt_ClassMethod(
  98. type: 9
  99. byRef: false
  100. params: array(
  101. )
  102. stmts: array(
  103. )
  104. name: b
  105. )
  106. 6: Stmt_ClassMethod(
  107. type: 33
  108. byRef: false
  109. params: array(
  110. )
  111. stmts: array(
  112. )
  113. name: c
  114. )
  115. 7: Stmt_ClassMethod(
  116. type: 2
  117. byRef: false
  118. params: array(
  119. )
  120. stmts: array(
  121. )
  122. name: d
  123. )
  124. 8: Stmt_ClassMethod(
  125. type: 4
  126. byRef: false
  127. params: array(
  128. )
  129. stmts: array(
  130. )
  131. name: e
  132. )
  133. )
  134. name: A
  135. )
  136. )