菜谱项目

staticPropertyFetch.test 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. Static property fetches
  2. -----
  3. <?php
  4. // property name variations
  5. A::$b;
  6. A::$$b;
  7. A::${'b'};
  8. // array access
  9. A::$b['c'];
  10. A::$b{'c'};
  11. // class name variations can be found in staticCall.test
  12. -----
  13. array(
  14. 0: Expr_StaticPropertyFetch(
  15. class: Name(
  16. parts: array(
  17. 0: A
  18. )
  19. comments: array(
  20. 0: // property name variations
  21. )
  22. )
  23. name: b
  24. comments: array(
  25. 0: // property name variations
  26. )
  27. )
  28. 1: Expr_StaticPropertyFetch(
  29. class: Name(
  30. parts: array(
  31. 0: A
  32. )
  33. )
  34. name: Expr_Variable(
  35. name: b
  36. )
  37. )
  38. 2: Expr_StaticPropertyFetch(
  39. class: Name(
  40. parts: array(
  41. 0: A
  42. )
  43. )
  44. name: Scalar_String(
  45. value: b
  46. )
  47. )
  48. 3: Expr_ArrayDimFetch(
  49. var: Expr_StaticPropertyFetch(
  50. class: Name(
  51. parts: array(
  52. 0: A
  53. )
  54. comments: array(
  55. 0: // array access
  56. )
  57. )
  58. name: b
  59. comments: array(
  60. 0: // array access
  61. )
  62. )
  63. dim: Scalar_String(
  64. value: c
  65. )
  66. comments: array(
  67. 0: // array access
  68. )
  69. )
  70. 4: Expr_ArrayDimFetch(
  71. var: Expr_StaticPropertyFetch(
  72. class: Name(
  73. parts: array(
  74. 0: A
  75. )
  76. )
  77. name: b
  78. )
  79. dim: Scalar_String(
  80. value: c
  81. )
  82. )
  83. 5: Stmt_Nop(
  84. comments: array(
  85. 0: // class name variations can be found in staticCall.test
  86. )
  87. )
  88. )