diff options
Diffstat (limited to 'Zend/tests/try/try_multicatch_005.phpt')
| -rw-r--r-- | Zend/tests/try/try_multicatch_005.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Zend/tests/try/try_multicatch_005.phpt b/Zend/tests/try/try_multicatch_005.phpt new file mode 100644 index 0000000000..cc3fc890fa --- /dev/null +++ b/Zend/tests/try/try_multicatch_005.phpt @@ -0,0 +1,25 @@ +--TEST-- +Catch exception in the nested multicatch +--FILE-- +<?php + +require_once __DIR__ . '/exceptions.inc'; + +try { + try { + echo 'TRY' . PHP_EOL; + throw new Exception3; + } catch (Exception1 | Exception3 $e) { + echo get_class($e) . PHP_EOL; + } +} catch(Exception2 | Exception3 $e) { + echo 'Should never be executed'; +} finally { + echo 'FINALLY' . PHP_EOL; +} + +?> +--EXPECT-- +TRY +Exception3 +FINALLY |
