1--TEST-- 2Fiber created in destructor 3--EXTENSIONS-- 4fiber 5--FILE-- 6<?php 7 8$object = new class() { 9 public function __destruct() 10 { 11 $fiber = new Fiber(static function (): int { 12 Fiber::suspend(1); 13 return 2; 14 }); 15 16 var_dump($fiber->start()); 17 var_dump($fiber->resume()); 18 var_dump($fiber->getReturn()); 19 } 20}; 21 22?> 23--EXPECT-- 24int(1) 25NULL 26int(2) 27