Examples menu

Examples

Every demo on this site runs inside the same php-via server you are connected to right now. There is no separate backend, no compiled JavaScript bundle, and no hydration step: just PHP, Twig, and a persistent SSE stream.

Reactive without JavaScript

Signals live on the server. Actions are PHP closures. The browser sends a POST and receives DOM patches over SSE. No client framework required.

Built-in multiplayer

Scope signals to a route, a session, or every connected client. Open two tabs and watch them stay in sync automatically.

MPA navigation

Full page loads, real URLs, browser history. No SPA router. SESSION-scoped signals follow the user across every page change.

Examples marked multiplayer share their state between visitors. Open them in two windows to see it.

Basics

Forms and sessions

Shared state

Live data and games

Several servers

The server runs one worker. Several demos, such as Todo, Stock Ticker and Game of Life, keep their state in PHP statics, which each worker holds on its own. Move that state into scoped signals, GlobalState or a database before you run them with withWorkerNum(). See What stays per worker. Each of those demos says so on its page.