arrayEmptyElemens.test 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Array with empty elements
  2. -----
  3. <?php
  4. [1, , 2];
  5. array(1, , 2);
  6. -----
  7. !!positions
  8. Cannot use empty array elements in arrays from 3:5 to 3:5
  9. Cannot use empty array elements in arrays from 4:10 to 4:10
  10. array(
  11. 0: Stmt_Expression[3:1 - 3:9](
  12. expr: Expr_Array[3:1 - 3:8](
  13. items: array(
  14. 0: ArrayItem[3:2 - 3:2](
  15. key: null
  16. value: Scalar_Int[3:2 - 3:2](
  17. value: 1
  18. )
  19. byRef: false
  20. unpack: false
  21. )
  22. 1: ArrayItem[3:5 - 3:5](
  23. key: null
  24. value: Expr_Error[3:5 - 3:5](
  25. )
  26. byRef: false
  27. unpack: false
  28. )
  29. 2: ArrayItem[3:7 - 3:7](
  30. key: null
  31. value: Scalar_Int[3:7 - 3:7](
  32. value: 2
  33. )
  34. byRef: false
  35. unpack: false
  36. )
  37. )
  38. )
  39. )
  40. 1: Stmt_Expression[4:1 - 4:14](
  41. expr: Expr_Array[4:1 - 4:13](
  42. items: array(
  43. 0: ArrayItem[4:7 - 4:7](
  44. key: null
  45. value: Scalar_Int[4:7 - 4:7](
  46. value: 1
  47. )
  48. byRef: false
  49. unpack: false
  50. )
  51. 1: ArrayItem[4:10 - 4:10](
  52. key: null
  53. value: Expr_Error[4:10 - 4:10](
  54. )
  55. byRef: false
  56. unpack: false
  57. )
  58. 2: ArrayItem[4:12 - 4:12](
  59. key: null
  60. value: Scalar_Int[4:12 - 4:12](
  61. value: 2
  62. )
  63. byRef: false
  64. unpack: false
  65. )
  66. )
  67. )
  68. )
  69. )