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 '%s' -->
31<!-- init Fiber::__construct() -->
32<!-- init Fiber::start() -->
33<!-- switching from fiber %s to %s -->
34<init '%s'>
35<!-- init {closure:%s:%d}() -->
36<!-- init Fiber::suspend() -->
37<!-- switching from fiber %s to %s -->
38<suspend '%s'>
39<!-- init Fiber::resume() -->
40<!-- switching from fiber %s to %s -->
41<resume '%s'>
42<!-- switching from fiber %s to %s -->
43<init '%s'>
44<!-- init {closure:%s:%d}() -->
45<!-- switching from fiber %s to %s -->
46<suspend '%s'>
47<!-- switching from fiber %s to %s -->
48<suspend '%s'>
49<!-- switching from fiber %s to %s -->
50<resume '%s'>
51<!-- switching from fiber %s to %s -->
52<destroying '%s'>
53<!-- switching from fiber %s to %s -->
54<destroyed '%s'>
55<!-- switching from fiber %s to %s -->
56<returned '%s'>
57