projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website]
/
vendor
/
nikic
/
php-parser
/
test
/
code
/
parser
/
stmt
/
tryCatch.test
1
Try/catch
2
-----
3
<?php
4
5
try {
6
doTry();
7
} catch (A $b) {
8
doCatchA();
9
} catch (B $c) {
10
doCatchB();
11
} finally {
12
doFinally();
13
}
14
15
// no finally
16
try { }
17
catch (A $b) { }
18
19
// no catch
20
try { }
21
finally { }
22
23
-----
24
array(
25
0: Stmt_TryCatch(
26
stmts: array(
27
0: Stmt_Expression(
28
expr: Expr_FuncCall(
29
name: Name(
30
parts: array(
31
0: doTry
32
)
33
)
34
args: array(
35
)
36
)
37
)
38
)
39
catches: array(
40
0: Stmt_Catch(
41
types: array(
42
0: Name(
43
parts: array(
44
0: A
45
)
46
)
47
)
48
var: Expr_Variable(
49
name: b
50
)
51
stmts: array(
52
0: Stmt_Expression(
53
expr: Expr_FuncCall(
54
name: Name(
55
parts: array(
56
0: doCatchA
57
)
58
)
59
args: array(
60
)
61
)
62
)
63
)
64
)
65
1: Stmt_Catch(
66
types: array(
67
0: Name(
68
parts: array(
69
0: B
70
)
71
)
72
)
73
var: Expr_Variable(
74
name: c
75
)
76
stmts: array(
77
0: Stmt_Expression(
78
expr: Expr_FuncCall(
79
name: Name(
80
parts: array(
81
0: doCatchB
82
)
83
)
84
args: array(
85
)
86
)
87
)
88
)
89
)
90
)
91
finally: Stmt_Finally(
92
stmts: array(
93
0: Stmt_Expression(
94
expr: Expr_FuncCall(
95
name: Name(
96
parts: array(
97
0: doFinally
98
)
99
)
100
args: array(
101
)
102
)
103
)
104
)
105
)
106
)
107
1: Stmt_TryCatch(
108
stmts: array(
109
)
110
catches: array(
111
0: Stmt_Catch(
112
types: array(
113
0: Name(
114
parts: array(
115
0: A
116
)
117
)
118
)
119
var: Expr_Variable(
120
name: b
121
)
122
stmts: array(
123
)
124
)
125
)
126
finally: null
127
comments: array(
128
0: // no finally
129
)
130
)
131
2: Stmt_TryCatch(
132
stmts: array(
133
)
134
catches: array(
135
)
136
finally: Stmt_Finally(
137
stmts: array(
138
)
139
)
140
comments: array(
141
0: // no catch
142
)
143
)
144
)