Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's nice to see PHP adding useful things like enums and async (green threads). My foray into Web development started with Perl, but quickly segued into PHP with how much simpler it felt. The ability to hop into vim on your server (or use CPanel back in the day) and edit your site live was exciting back then – but now that very thought makes me shudder with what could go wrong, haha.

While I've moved onto JVM languages and Rust professionally, I do hope PHP will continue getting future generations excited about Web development and building out their ideas quickly.

FYI: Not sure if the author will see this but some spelling mistakes in the article. [0] E.g. s/reslease/release/

0. https://stitcher.io/blog/php-in-2021#the-community



> FYI: Not sure if the author will see this but some spelling mistakes in the article. [0] E.g. s/reslease/release/

Thanks, I saw it :)


Just yesterday I hopped into a server, attached to a running app, and did the copy/pasta thing to dynamically add some debug logging to a running app. It worked great!


What do they want async for? PHP's purpose is to run once to generate one HTTP response - they'd already forgotten this by inventing frameworks, but adding async seems to especially have forgotten this.

PHP already had curl_multi_perform which is very useful for running child tasks, but I'm not sure you need much more than that.


The usual asynchronous stuff like fetching data from two APIs to then prepare the HTML response to the user. Today, it's sequential, which is fine for DB calls to localhost, but less fine with API calls.


Well that’s one purpose of php.

My workloads involve billions of php executions daily that have nothing to do with http or Apache or serving pages. Lambda and cli based jobs mainly.

PHP can do a lot of things if you stick with it and don’t jump to the next shiny object. Async helps with this.


People also use PHP to write backend scripts, without web use at all.

While the original and primary purpose may have been for personal home pages, it has evolved considerably since then. Consider an accounting/aggregate billing script for a PHP application that runs on a scheduler. That isn't dependent on the web necessarily, but it does interface with the moving parts of the overall application. Async would be great here.


Another use of async is to build other kinds of servers like websockets, which need to hold long-term connections. ReactPHP + Ratchet works great for that in PHP. Currently it works with an event loop (multiple implementations under the hood, like libev, libuv, etc) similarly to Node. Fibers should make the internals of ReactPHP better, but it'll barely change anything in userland.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: