repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
close the connection in admin server
[hiphop-php.git]
/
hphp
/
test
/
slow
/
finally
/
new_try_catch_001.php
blob
ad7f4adfbd0c3d40df99c5909aa2fe6deb21239e
1
<
?php
2
3
function
blah
() {
4
$xs
=
array
(
1
,
2
,
3
);
5
$ys
=
array
(
1
,
2
,
3
);
6
$zs
=
array
(
1
,
2
,
3
);
7
try
{
8
foreach
(
$xs
as
$x
) {
9
foreach
(
$ys
as
$y
) {
10
foreach
(
$zs
as
$z
) {
11
echo
"
$x\n
"
;
12
echo
"
$y\n
"
;
13
echo
"
$z\n
"
;
14
if
(
$x
==
2
&&
$y
==
2
&&
$z
==
2
) {
15
echo
"4
\n
"
;
16
throw new
Exception
(
"blah!"
);
17
echo
"aaa
\n
"
;
18
}
19
}
20
}
21
}
22
}
catch
(
Exception
$e
) {
23
echo empty
(
$x
)
?
"bbb
\n
"
:
"5
\n
"
;
24
echo empty
(
$y
)
?
"ccc
\n
"
:
"6
\n
"
;
25
echo empty
(
$z
)
?
"ddd
\n
"
:
"7
\n
"
;
26
echo
"8
\n
"
;
27
}
28
return
9
;
29
}
30
31
var_dump
(
blah
());
32