xref: /PHP-5.6/Zend/tests/catch_finally_001.phpt (revision 60a29791)
1--TEST--
2Try catch finally (basic test)
3--FILE--
4<?php
5function foo ($throw = FALSE) {
6   try {
7     echo "try\n";
8     if ($throw) {
9        throw new Exception("ex");
10     }
11   } catch (Exception $e) {
12     echo "catch\n";
13   } finally {
14     echo "finally\n";
15   }
16
17   echo "end\n";
18}
19
20foo();
21echo "\n";
22foo(true);
23?>
24--EXPECTF--
25try
26finally
27end
28
29try
30catch
31finally
32end
33