comparison vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 5fb285c0d0e3
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 Some statements may occur outside of namespaces
2 -----
3 <?php
4 declare(A='B');
5 namespace B {
6
7 }
8 __halt_compiler()
9 ?>
10 Hi!
11 -----
12 array(
13 0: Stmt_Declare(
14 declares: array(
15 0: Stmt_DeclareDeclare(
16 key: A
17 value: Scalar_String(
18 value: B
19 )
20 )
21 )
22 stmts: null
23 )
24 1: Stmt_Namespace(
25 name: Name(
26 parts: array(
27 0: B
28 )
29 )
30 stmts: array(
31 )
32 )
33 2: Stmt_HaltCompiler(
34 remaining: Hi!
35 )
36 )
37 -----
38 <?php
39 /* Comment */
40 ;
41 namespace Foo;
42 -----
43 array(
44 0: Stmt_Nop(
45 comments: array(
46 0: /* Comment */
47 )
48 )
49 1: Stmt_Namespace(
50 name: Name(
51 parts: array(
52 0: Foo
53 )
54 )
55 stmts: array(
56 )
57 )
58 )