1--TEST-- 2Observer: Nested fibers 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 var_dump(1); 15 16 $fiber = new Fiber(function (): void { 17 Fiber::suspend(); 18 var_dump(3); 19 Fiber::suspend(); 20 var_dump(5); 21 }); 22 23 $fiber->start(); 24 25 Fiber::suspend(); 26 var_dump(2); 27 28 $fiber->resume(); 29 30 Fiber::suspend(); 31 var_dump(4); 32 33 $fiber->resume(); 34}); 35 36$fiber->start(); 37$fiber->resume(); 38$fiber->resume(); 39$fiber->resume(); 40 41?> 42--EXPECTF-- 43<!-- init '%sobserver_fiber_03.php' --> 44<!-- switching from fiber %s to %s --> 45<init '%s'> 46<!-- init {closure}() --> 47<!-- switching from fiber %s to %s --> 48<suspend '%s'> 49<!-- switching from fiber %s to %s --> 50<resume '%s'> 51int(1) 52<!-- switching from fiber %s to %s --> 53<init '%s'> 54<!-- init {closure}() --> 55<!-- switching from fiber %s to %s --> 56<suspend '%s'> 57<!-- switching from fiber %s to %s --> 58<suspend '%s'> 59<!-- switching from fiber %s to %s --> 60<resume '%s'> 61int(2) 62<!-- switching from fiber %s to %s --> 63<resume '%s'> 64int(3) 65<!-- switching from fiber %s to %s --> 66<suspend '%s'> 67<!-- switching from fiber %s to %s --> 68<suspend '%s'> 69<!-- switching from fiber %s to %s --> 70<resume '%s'> 71int(4) 72<!-- switching from fiber %s to %s --> 73<resume '%s'> 74int(5) 75<!-- switching from fiber %s to %s --> 76<returned '%s'> 77<!-- switching from fiber %s to %s --> 78<returned '%s'> 79