1--TEST--
2Out of Memory from recursive fiber creation
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
16function create_fiber(): Fiber
17{
18    $fiber = new Fiber('create_fiber');
19    $fiber->start();
20    return $fiber;
21}
22
23$fiber = new Fiber('create_fiber');
24$fiber->start();
25
26?>
27--EXPECTF--
28Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %sout-of-memory-in-recursive-fiber.php on line %d
29