← All built-ins / ui_dispatch()

ui_dispatch()

ui_dispatch(int $n): int

Parameters

Takes no arguments.

Return value

Runs one iteration of the UI event loop and returns an event count.

Example

echo "manual loop: while (ui_alive()) { ui_dispatch(); }";
manual loop: while (ui_alive()) { ui_dispatch(); }

This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.

See also

ui_run_main()ui_alive()