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