summaryrefslogtreecommitdiff
path: root/Zend/tests/try_finally_001.phpt
blob: 33744d064c4c4157eb3c172ed944a1730692944a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Try finally (basic test)
--FILE--
<?php
function foo ($a) {
   try {
     throw new Exception("ex");
   } finally {
     var_dump($a);
   }
}

foo("finally");
?>
--EXPECTF--
string(7) "finally"

Fatal error: Uncaught Exception: ex %s
Stack trace:
#0 %stry_finally_001.php(%d): foo('finally')
#1 {main}
  thrown in %stry_finally_001.php on line %d