invalidName.test 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Invalid namespace names
  2. -----
  3. <?php use A as self;
  4. -----
  5. Cannot use A as self because 'self' is a special class name from 1:16 to 1:19
  6. array(
  7. 0: Stmt_Use(
  8. type: TYPE_NORMAL (1)
  9. uses: array(
  10. 0: Stmt_UseUse(
  11. type: TYPE_UNKNOWN (0)
  12. name: Name(
  13. parts: array(
  14. 0: A
  15. )
  16. )
  17. alias: Identifier(
  18. name: self
  19. )
  20. )
  21. )
  22. )
  23. )
  24. -----
  25. <?php use B as PARENT;
  26. -----
  27. Cannot use B as PARENT because 'PARENT' is a special class name from 1:16 to 1:21
  28. array(
  29. 0: Stmt_Use(
  30. type: TYPE_NORMAL (1)
  31. uses: array(
  32. 0: Stmt_UseUse(
  33. type: TYPE_UNKNOWN (0)
  34. name: Name(
  35. parts: array(
  36. 0: B
  37. )
  38. )
  39. alias: Identifier(
  40. name: PARENT
  41. )
  42. )
  43. )
  44. )
  45. )
  46. -----
  47. <?php use C as static;
  48. -----
  49. Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
  50. array(
  51. )