Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
<?php OpenSwoole\Event::exit()\:\ void
Exit the Event Loop, only available at client side, meaning, you can exit and stop the event loop you are currently in but not the main server event loop.
<?php
OpenSwoole\Timer::tick(1000, function() {
echo "tick\n";
OpenSwoole\Event::exit();
});
OpenSwoole\Event::wait();