1--TEST--
2Observer: Nested fibers with unfinished fiber
3--EXTENSIONS--
4zend_test
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.show_output=1
8zend_test.observer.fiber_switch=1
9--FILE--
10<?php
11
12$fiber = new Fiber(function (): void {
13    Fiber::suspend();
14
15    $fiber = new Fiber(function (): void {
16        Fiber::suspend();
17    });
18
19    $fiber->start();
20
21    Fiber::suspend();
22});
23
24$fiber->start();
25$fiber->resume();
26$fiber->resume();
27
28?>
29--EXPECTF--
30<!-- init '%sobserver_fiber_04.php' -->
31<!-- switching from fiber %s to %s -->
32<init '%s'>
33<!-- init {closure}() -->
34<!-- switching from fiber %s to %s -->
35<suspend '%s'>
36<!-- switching from fiber %s to %s -->
37<resume '%s'>
38<!-- switching from fiber %s to %s -->
39<init '%s'>
40<!-- init {closure}() -->
41<!-- switching from fiber %s to %s -->
42<suspend '%s'>
43<!-- switching from fiber %s to %s -->
44<suspend '%s'>
45<!-- switching from fiber %s to %s -->
46<resume '%s'>
47<!-- switching from fiber %s to %s -->
48<destroying '%s'>
49<!-- switching from fiber %s to %s -->
50<destroyed '%s'>
51<!-- switching from fiber %s to %s -->
52<returned '%s'>
53