Getting started with ReactPHP Pushing real-time data to the browser
summary
Claims that PHP runs non‑blocking I/O with an event loop, uses promises and streams, and pushes live data to browsers via Server‑Sent Events. Implements TCP socket chat + Redis pub/sub + an HTTP server (PSR‑7) and an EventSource client; three concurrent HTTP requests finish in ~140 ms—about the same as one. Builds a single‑file distributed HTTP streaming server and a working chat demo (live restart hiccup but functions in browser). Notes ecosystem size: 300+ ReactPHP repos.
AI-written summary · about
chapters (23)
- 0:00Start
- 1:52Introduction
- 2:36Pushing Real-Time Data to the Browser
- 2:55Agenda
- 5:21How Do People See Php Being Used
- 5:58To Improve Php's Performance
- 7:19Live Data with Php
- 10:21What React Is
- 10:42The Idea behind React Php
- 14:09Event Loop
- 16:16Periodic Timer
- 16:54Streaming Data
- 19:24Sockets
- 20:10Start a Socket Server in React Php
- 24:14Socket Client
- 24:51What Do Sockets Look like in Practice
- 25:45Promises
- 29:39What Is Http Streaming
- 30:20Http Server
- 33:22Event Source
- 33:34What's Event Source
- 39:09Conclusions
- 44:58React php Stickers
related talks
43mGetting started with ReactPHP – Pushing Real-Time Data to the Browser
46mPushing the limits of PHP with React PHP
33mAn Introduction to Asynchronous PHP using ReactPHP
40mIntroduction to ReactPHP and Websockets
50mImproving Application Performance with ReactPHP
46mReaktywny PHP
32mAsynchronous PHP
01h 04mI saw the future, and its web servers were written in PHP
