Hacker News new | ask | show | jobs
by evanelias 650 days ago
Does PHP have async/await yet? In my mind that was always a huge advantage of HHVM/Hack which normal PHP completely lacked.
1 comments

Thankfully, no - IMHO, PHP doesn't need non-blocking or asynchronous execution, as that's what makes it so accessible and understandable
Huh, I'm surprised by that take. await is one of the easiest-to-comprehend and readable approaches to concurrency. Slack summarized this better than I can, see the async/await section of their post https://slack.engineering/hacklang-at-slack-a-better-php/

Without async/await, PHP will remain a bad fit for large-scale applications that need to query data from numerous distinct services or data stores for a single page load without incurring major latency. It was an absolutely essential feature of Hack at Facebook. Lack of async/await in PHP was a huge problem at Tumblr when trying to reduce latency.