xref: /php-src/Zend/tests/gh9916-002.phpt (revision 1173c2e6)
1--TEST--
2Bug GH-9916 002 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes)
3--FILE--
4<?php
5$gen = (function() {
6    $x = new stdClass;
7    print "Before suspend\n";
8    Fiber::suspend();
9    print "Not executed\n";
10    yield;
11})();
12$fiber = new Fiber(function() use ($gen, &$fiber) {
13    $gen->current();
14    print "Not executed";
15});
16$fiber->start();
17?>
18==DONE==
19--EXPECT--
20Before suspend
21==DONE==
22