xref: /PHP-7.1/Zend/tests/try/try_finally_001.phpt (revision 25d327e5)
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: 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