xref: /ext-fiber/tests/fiber-get-current.phpt (revision b5d6a96a)
1--TEST--
2Fiber::getCurrent()
3--EXTENSIONS--
4fiber
5--FILE--
6<?php
7
8var_dump(Fiber::getCurrent());
9
10$fiber = new Fiber(function (): void {
11    var_dump(Fiber::getCurrent());
12});
13
14$fiber->start();
15
16?>
17--EXPECTF--
18NULL
19object(Fiber)#%d (0) {
20}
21