Sure. But JavaScript has Promise built in to the language these days. With PHP you'd have to use a third party extension, like swoole, if you want something like that. Or write your own, of course.
But should we need to do this for a 25 year old backend language?
But should we need to do this for a 25 year old backend language?