php-src/ext/zend_test/tests/fiber_test_07.phpt

22 lines
292 B
Plaintext
Raw Normal View History

--TEST--
Symmetric coroutine does not leak prior context
--EXTENSIONS--
zend_test
--FILE--
<?php
$fiber = new _ZendTestFiber(function (): int {
return 1;
});
$fiber->pipeTo(function (int $result): void {
var_dump($result);
});
var_dump($fiber->start());
?>
2021-06-29 21:34:26 +08:00
--EXPECT--
int(1)
NULL