About
- Intended audience
- Code samples
- Errata
Asynchronous PHP
- Introduction
- What is the right tool?
- Asynchronous vs parallel
- A real application
HTTP server
- Required software and components
- The couple lines HTTP server
- Event-driven execution
- Handling the request
Routing requests
- Organizing the code
- What is router?
- Router class
- Respond from routes
- Router refactoring
Rendering HTML files
- Reading files. A wrong way
- Blocking and non-blocking calls
- Child process
- Windows Compatibility
- Dependency injection
- Wire child process and response with streams
- Current working directory
Handle POST requests
- Uploading files
- Storing uploads on disk
- Issue with hanging process
View uploads
- Piping streams
- Rendering PHP template
- Update uploading response
- Move uploads list to main page
- Why this line was commented before?
Adding image previews
- Router with regular expressions
Extracting controllers
- Add application namespace
- First controller
- Remove logic from routes
- Child processes factory
- Controller for downloads
- Missed controller for favicon
Resizing images
- Streams and events
- Display real preview
- The problem of asynchronous response
Deferred response
- The problem
- Promise and deferred
- A deferred response
Handling errors
- Server Error event
- Why does the server catch all errors/exceptions?
- Catch all errors
Up and running
- Supervisor: script as service