xref: /PHP-5.6/Zend/tests/try_finally_001.phpt (revision 60a29791)
1--TEST--
2Try finally (basic test)
3--FILE--
4<?php
5function foo ($a) {
6   try {
7     throw new Exception("ex");
8   } finally {
9     var_dump($a);
10   }
11}
12
13foo("finally");
14?>
15--EXPECTF--
16string(7) "finally"
17
18Fatal error: Uncaught exception 'Exception' with message 'ex' %s
19Stack trace:
20#0 %stry_finally_001.php(%d): foo('finally')
21#1 {main}
22  thrown in %stry_finally_001.php on line %d
23