Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Swoole\Event::delSwoole\Event::isset>
^Swoole\EventLast updated: Mon, 26 Oct 2026

Swoole\Event::dispatch

(No version information available, might only be in Git)

Swoole\Event::dispatch — Perform a single event loop iteration

Description

public static function Swoole\Event::dispatch(): void

The purpose of this function is to maintain compatibility with some frameworks. When a framework internally manages its own reactor loop, using Event::wait would allow Swoole's underlying layer to retain control, preventing the framework from taking over execution.

Return Values

No return value.

Examples

Example #1 Manual event loop control

<?php
while (true) {
    Swoole\Event::dispatch();
}


<Swoole\Event::delSwoole\Event::isset>
^Swoole\EventLast updated: Mon, 26 Oct 2026