The SitePoint PHP blog has a new tutorial from Christopher Pitt showing you how to integrate websockets into your application for asynchronous, real-time functionality. His method makes use of a service called Socketize (with a free tier available).
Asynchronous architecture is common in other programming languages, but it’s only just finding its feet in PHP. The trouble is that this new architecture comes with a cost.
I don’t talk about that cost enough. [...] When I recommend frameworks like Icicle, ReactPHP, and AMPHP, the obvious place to start with them is to create something new. [...] It takes a lot of work to integrate new, asynchronous features into existing applications. Often there are good reasons and great benefits, but a rewrite is always a hard-sell. [...] I’m going to show you a Sockets-as-a-Service service, called Socketize.