1--TEST--
2Out of Memory in a 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    $buffer = '';
16    while (true) {
17        $buffer .= str_repeat('.', 1 << 10);
18    }
19});
20
21$fiber->start();
22
23?>
24--EXPECTF--
25Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %sout-of-memory-in-fiber.php on line %d
26