We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4df21bb commit 09688b2Copy full SHA for 09688b2
Zend/tests/fibers/catch-then-suspend.phpt
@@ -0,0 +1,25 @@
1
+--TEST--
2
+Catch exception thrown into fiber, then suspend again
3
+--FILE--
4
+<?php
5
+
6
+$fiber = new Fiber(function () {
7
+ try {
8
+ Fiber::suspend('in try');
9
+ } catch (Exception $exception) {
10
+ }
11
12
+ Fiber::suspend('after catch');
13
+});
14
15
+var_dump($fiber->start());
16
17
+var_dump($fiber->throw(new Exception));
18
19
+var_dump($fiber->resume());
20
21
+?>
22
+--EXPECT--
23
+string(6) "in try"
24
+string(11) "after catch"
25
+NULL
0 commit comments