invalidName.test 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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: UseItem(
  11. type: TYPE_UNKNOWN (0)
  12. name: Name(
  13. name: A
  14. )
  15. alias: Identifier(
  16. name: self
  17. )
  18. )
  19. )
  20. )
  21. )
  22. -----
  23. <?php use B as PARENT;
  24. -----
  25. Cannot use B as PARENT because 'PARENT' is a special class name from 1:16 to 1:21
  26. array(
  27. 0: Stmt_Use(
  28. type: TYPE_NORMAL (1)
  29. uses: array(
  30. 0: UseItem(
  31. type: TYPE_UNKNOWN (0)
  32. name: Name(
  33. name: B
  34. )
  35. alias: Identifier(
  36. name: PARENT
  37. )
  38. )
  39. )
  40. )
  41. )
  42. -----
  43. <?php use C as static;
  44. -----
  45. Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
  46. array(
  47. )