File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ $c = spawn(function() {
1616
1717 $ coro = $ f ->getCoroutine ();
1818 echo "Has coroutine: " . ($ coro !== null ? "yes " : "no " ) . "\n" ;
19- echo "Coroutine ID: " . $ coro ->getId () . "\n" ;
19+ echo "Has ID: " . ( $ coro ->getId () > 0 ? " yes " : " no " ) . "\n" ;
2020 echo "Is started: " . ($ coro ->isStarted () ? "yes " : "no " ) . "\n" ;
2121 echo "Is suspended: " . ($ coro ->isSuspended () ? "yes " : "no " ) . "\n" ;
2222
@@ -33,16 +33,16 @@ $f = new Fiber(function() {
3333$ f ->start ();
3434
3535$ coro = $ f ->getCoroutine ();
36- echo "Regular fiber coroutine : " . ($ coro === null ? "null " : "not-null " ) . "\n" ;
36+ echo "Regular fiber: " . ($ coro === null ? "null " : "not-null " ) . "\n" ;
3737
3838$ f ->resume ();
3939
4040echo "OK \n" ;
4141?>
4242--EXPECT--
4343Has coroutine: yes
44- Coroutine ID: 2
44+ Has ID: yes
4545Is started: yes
4646Is suspended: yes
47- Regular fiber coroutine : null
47+ Regular fiber: null
4848OK
You can’t perform that action at this time.
0 commit comments