staticPropertyFetch.test 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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: Stmt_Expression(
  15. expr: Expr_StaticPropertyFetch(
  16. class: Name(
  17. name: A
  18. )
  19. name: VarLikeIdentifier(
  20. name: b
  21. )
  22. )
  23. comments: array(
  24. 0: // property name variations
  25. )
  26. )
  27. 1: Stmt_Expression(
  28. expr: Expr_StaticPropertyFetch(
  29. class: Name(
  30. name: A
  31. )
  32. name: Expr_Variable(
  33. name: b
  34. )
  35. )
  36. )
  37. 2: Stmt_Expression(
  38. expr: Expr_StaticPropertyFetch(
  39. class: Name(
  40. name: A
  41. )
  42. name: Scalar_String(
  43. value: b
  44. )
  45. )
  46. )
  47. 3: Stmt_Expression(
  48. expr: Expr_ArrayDimFetch(
  49. var: Expr_StaticPropertyFetch(
  50. class: Name(
  51. name: A
  52. )
  53. name: VarLikeIdentifier(
  54. name: b
  55. )
  56. )
  57. dim: Scalar_String(
  58. value: c
  59. )
  60. )
  61. comments: array(
  62. 0: // array access
  63. )
  64. )
  65. 4: Stmt_Expression(
  66. expr: Expr_ArrayDimFetch(
  67. var: Expr_StaticPropertyFetch(
  68. class: Name(
  69. name: A
  70. )
  71. name: VarLikeIdentifier(
  72. name: b
  73. )
  74. )
  75. dim: Scalar_String(
  76. value: c
  77. )
  78. )
  79. )
  80. 5: Stmt_Nop(
  81. comments: array(
  82. 0: // class name variations can be found in staticCall.test
  83. )
  84. )
  85. )