diff options
| author | Anatol Belski <ab@php.net> | 2015-03-16 19:26:17 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2015-03-16 19:26:17 +0100 |
| commit | eab7da4bc91a60220bc8c6a208de1d324a7529aa (patch) | |
| tree | 533fbbf098d3b31f330ed49865656dc972fb8886 /tests | |
| parent | 1c0fce922ec5549bc127ad1238036e5d084f096c (diff) | |
| download | php-git-eab7da4bc91a60220bc8c6a208de1d324a7529aa.tar.gz | |
test timeout with exception variation
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basic/timeout_variation_6.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_6.phpt b/tests/basic/timeout_variation_6.phpt new file mode 100644 index 0000000000..387a358fc8 --- /dev/null +++ b/tests/basic/timeout_variation_6.phpt @@ -0,0 +1,24 @@ +--TEST-- +Timeout within function trowing exteption before timeout reached +--FILE-- +<?php + +$t = 3; +set_time_limit($t); + +function f($t) { + echo "call"; + sleep($t-1); + throw new Exception("exception before timeout"); +} + +f($t); +?> +never reached here +--EXPECTF-- +call +Fatal error: Uncaught exception 'Exception' with message 'exception before timeout' in %s:%d +Stack trace: +#0 %s(%d): f(%d) +#1 {main} + thrown in %s on line %d |
