1--TEST-- 2Fiber interaction with custom fiber implementation 1 3--EXTENSIONS-- 4zend_test 5--FILE-- 6<?php 7$fiber = new Fiber(function (): int { 8 $test = new _ZendTestFiber(function (): int { 9 $value = Fiber::suspend(123); 10 var_dump($value); // int(246) 11 return $value; 12 }); 13 var_dump($test->start()); // NULL 14 return 1; 15}); 16$value = $fiber->start(); 17var_dump($value); // int(123) 18$value = $fiber->resume(2 * $value); 19var_dump($value); // NULL 20var_dump($fiber->getReturn()); // int(1) 21 22?> 23--EXPECT-- 24int(123) 25int(246) 26NULL 27NULL 28int(1) 29