php-src/ext/zend_test/tests/fiber_test_07.phpt
2021-06-29 17:13:02 +02:00

22 lines
292 B
PHP

--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());
?>
--EXPECT--
int(1)
NULL