aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/php/vendor/react/event-loop/examples/03-ticks.php
diff options
context:
space:
mode:
Diffstat (limited to 'assets/php/vendor/react/event-loop/examples/03-ticks.php')
-rw-r--r--assets/php/vendor/react/event-loop/examples/03-ticks.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/assets/php/vendor/react/event-loop/examples/03-ticks.php b/assets/php/vendor/react/event-loop/examples/03-ticks.php
new file mode 100644
index 0000000..3f36c6d
--- /dev/null
+++ b/assets/php/vendor/react/event-loop/examples/03-ticks.php
@@ -0,0 +1,15 @@
+<?php
+
+require __DIR__ . '/../vendor/autoload.php';
+
+$loop = React\EventLoop\Factory::create();
+
+$loop->futureTick(function () {
+ echo 'b';
+});
+$loop->futureTick(function () {
+ echo 'c';
+});
+echo 'a';
+
+$loop->run();