mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
22 lines
292 B
PHP
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
|