1--TEST--
2Observer: Basic fiber switching
3--EXTENSIONS--
4zend_test
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.show_output=1
8zend_test.observer.fiber_init=1
9zend_test.observer.fiber_switch=1
10zend_test.observer.fiber_destroy=1
11--FILE--
12<?php
13
14$fiber = new Fiber(function (): void {
15    Fiber::suspend();
16});
17
18$fiber->start();
19$fiber->resume();
20
21?>
22--EXPECTF--
23<!-- init '%s' -->
24<!-- init Fiber::__construct() -->
25<!-- init Fiber::start() -->
26<!-- alloc: %s -->
27<!-- switching from fiber %s to %s -->
28<init '%s'>
29<!-- init {closure:%s:%d}() -->
30<!-- init Fiber::suspend() -->
31<!-- switching from fiber %s to %s -->
32<suspend '%s'>
33<!-- init Fiber::resume() -->
34<!-- switching from fiber %s to %s -->
35<resume '%s'>
36<!-- switching from fiber %s to %s -->
37<returned '%s'>
38<!-- destroy: %s -->
39