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
- Counter Count up and down by a step size you set.
- Greeter Click a name and the server changes the greeting.
- Path Parameters Open article links whose year, month and slug come from the URL.
- Live Search Search PHP functions as you type, filtered on the server.
- Components Click three counters that each keep their own count.
- Theme Builder Pick colours for a preview card, then undo and redo.
Forms and sessions
- Multi-step Form Fill in a three-step form that checks your input on the server.
- Contact Form Send a form with a file and see an error next to each wrong field.
- Login Flow Log in to reach two protected pages, then log out.
- Shopping Cart Fill a cart that every tab of your browser shares.
- SharedWorker Upload Start an upload and keep it running while you move between pages.
Shared state
- All Scopes Compare a status for everyone, a counter per page and a message per tab. multiplayer
- Todo List Add, tick off and delete todos on a list every visitor shares. multiplayer
- Leaderboard Vote toppings up a shared list and watch the rows glide to their new rank. multiplayer
- Chat Room Chat with other visitors in one of several rooms. multiplayer
- Client Monitor Watch open connections appear and disappear as tabs come and go. multiplayer
- Spreadsheet Edit cells together with others and see where their cursors are. multiplayer
Live data and games
- Stock Ticker Watch simulated prices and charts change every two seconds. multiplayer
- Live Auction Bid against other visitors before the clock runs out. multiplayer
- Game of Life Draw on a shared board and watch the patterns evolve. multiplayer
- Type Race Race other visitors to type a PHP snippet first. multiplayer
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.