summaryrefslogtreecommitdiff
path: root/Zend/tests/try/catch_finally_005.phpt
blob: 7671d05df5820d8975b8512db2a0acb212907914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Try catch finally (with multi-returns and exception)
--FILE--
<?php
function foo ($a) {
   try {
     throw new Exception("ex");
   } catch (PdoException $e) {
     die("error");
   } catch (Exception $e) {
     return 2;
   } finally {
     return 3;
   }
   return 1;
}

var_dump(foo("para"));
?>
--EXPECT--
int(3)