1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00
Files
archived-php-src/sapi/phpdbg/tests/exceptions_003.phpt
Dmitry Stogov 86a96f2cf1 Changed meaning of "op2" for ZEND_FREE, ZEND_FE_FREE, ZEND_FAST_CALL, ZEND_FAST_RET.
Previously it was an instruction number.
Now it's an index in op_array->try_cacth_array[].
2015-11-10 19:13:54 +03:00

55 lines
1.2 KiB
PHP

--TEST--
Test breaks on HANDLE_EXCEPTION
--PHPDBG--
b 5
r
s
s
q
--EXPECTF--
[Successful compilation of %s]
prompt> [Breakpoint #0 added at %s:5]
prompt> [Breakpoint #0 at %s:5, hits: 1]
>00005: x();
00006: } finally {
00007: print "ok\n";
prompt> [L0 %s HANDLE_EXCEPTION %s]
>00005: x();
00006: } finally {
00007: print "ok\n";
prompt> [L7 %s ECHO "ok " %s]
>00007: print "ok\n";
00008: }
00009: } catch (Error $e) {
prompt> ok
[L7 %s FAST_RET<TO_CATCH> ~%d 0 %s]
[L9 %s CATCH "Error" $e 1 %s]
>00005: x();
00006: } finally {
00007: print "ok\n";
prompt> [L10 %s ECHO "caught " %s]
>00010: print "caught\n";
00011: }
00012:
prompt> caught
[L10 %s RETURN 1 %s]
[Script ended normally]
prompt>
--FILE--
<?php
try {
try {
x();
} finally {
print "ok\n";
}
} catch (Error $e) {
print "caught\n";
}
?>