xref: /ext-fiber/tests/resume.phpt (revision 068e4ea3)
1--TEST--
2Test resume
3--EXTENSIONS--
4fiber
5--FILE--
6<?php
7
8$fiber = new Fiber(function (): void {
9    $value = Fiber::suspend(1);
10    var_dump($value);
11});
12
13$value = $fiber->start();
14var_dump($value);
15$fiber->resume($value + 1);
16
17?>
18--EXPECT--
19int(1)
20int(2)
21