Improving Application Performance with ReactPHP
summary
Explains how ReactPHP turns PHP into an event loop system using promises and streams, showing a concrete rewrite of three sequential HTTP requests into concurrent Browser client calls that wait only for the slowest response. Demonstrates timers, stream chunk processing, and async DB/file adapters (avoid PDO and file_get_contents). Notes pitfalls: any blocking call freezes the loop, long-running handlers and memory cleanup matter. Cites DriftPHP built on ReactPHP and a production crypto-exchange migration that measurably improves throughput.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:33Asynchronous PHP
- 5:41Parallel flow
- 5:56Asynchronous flow
- 6:41Performance
- 7:14Asynchronous approach
- 9:57Non-blocking I/O
- 11:18Event-driven architecture
- 20:24Promises: managing concurrency
- 22:58Streams API
- 24:32Ecosystem
- 26:04Asynchronous code
- 31:18Blocking calls
related talks
46mPushing the limits of PHP with React PHP
33mAn Introduction to Asynchronous PHP using ReactPHP
46mGetting started with ReactPHP Pushing real-time data to the browser
43mGetting started with ReactPHP – Pushing Real-Time Data to the Browser
46mReaktywny PHP
01h 19mBuilding APIs with ReactPHP
32mAsynchronous PHP
18mMy Take on PHP
