1--TEST-- 2Out of Memory in a nested fiber 3--INI-- 4memory_limit=2M 5--SKIPIF-- 6<?php 7if (getenv("USE_ZEND_ALLOC") === "0") { 8 die("skip Zend MM disabled"); 9} 10?> 11--FILE-- 12<?php 13 14$fiber = new Fiber(function (): void { 15 $fiber = new Fiber(function (): void { 16 $buffer = ''; 17 while (true) { 18 $buffer .= str_repeat('.', 1 << 10); 19 } 20 }); 21 22 $fiber->start(); 23}); 24 25$fiber->start(); 26 27?> 28--EXPECTF-- 29Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %sout-of-memory-in-nested-fiber.php on line %d 30