4 ms·
Does PHP have async/await yet? In my mind that was always a huge advantage of HHVM/Hack which normal PHP completely lacked.
by evanelias 2y ago
Does PHP have async/await yet? In my mind that was always a huge advantage of HHVM/Hack which normal PHP completely lacked.
- jasongill 2y agoThankfully, no - IMHO, PHP doesn't need non-blocking or asynchronous execution, as that's what makes it so accessible and understandable
- evanelias 2y agoHuh, 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/ 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.