-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
questionFurther information is requestedFurther information is requested
Milestone
Description
Hi everybody,
<?php
require __DIR__ . '/async/vendor/autoload.php';
use React\EventLoop\Loop;
use React\Promise\Promise;
use function React\Async\await;
use function React\Async\async;
Loop::addTimer(0.5, React\Async\async(function() {
echo 'a';
React\async\await(React\Promise\Timer\sleep(1.0));
echo 'c'; // not echoed?
}));
Loop::addTimer(1.0, fn() => echo 'b'); // line 16
I am already struggling with the simplest example (copied from the main page).
I am using PHP 8.1.2 on Win10 with the newest async.
- There is an unexpected token "echo" in line 16.
- When I comment line 16 with // in the beginning, the output is just 'a' (without 'c') - why not 'ac'?
Thank you!
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested