outsideStmt.test 845 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. Some statements may occur outside of namespaces
  2. -----
  3. <?php
  4. declare(A='B');
  5. namespace B {
  6. }
  7. __halt_compiler()
  8. ?>
  9. Hi!
  10. -----
  11. array(
  12. 0: Stmt_Declare(
  13. declares: array(
  14. 0: DeclareItem(
  15. key: Identifier(
  16. name: A
  17. )
  18. value: Scalar_String(
  19. value: B
  20. )
  21. )
  22. )
  23. stmts: null
  24. )
  25. 1: Stmt_Namespace(
  26. name: Name(
  27. name: B
  28. )
  29. stmts: array(
  30. )
  31. )
  32. 2: Stmt_HaltCompiler(
  33. remaining: Hi!
  34. )
  35. )
  36. -----
  37. <?php
  38. /* Comment */
  39. ;
  40. namespace Foo;
  41. -----
  42. array(
  43. 0: Stmt_Nop(
  44. comments: array(
  45. 0: /* Comment */
  46. )
  47. )
  48. 1: Stmt_Namespace(
  49. name: Name(
  50. name: Foo
  51. )
  52. stmts: array(
  53. )
  54. )
  55. )