Swoole\Event::wait
PHP function
Edit on GitHub ✎
(PECL swoole >= 1.9.0)
Start event loop
Description
Swoole\Event::wait(): void
Starts the event loop. Place this at the end of your PHP program.
Return Values
No return value.
Examples
Swoole\Event::wait() example
php
<?php
Swoole\Timer::tick(1000, function () {
echo "hello\n";
});
Swoole\Event::wait();
?>