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

- No proper multithreading

Maybe you are not familiar with PHP multithreading in recent times but I have been using https://github.com/krakjoe/pthreads and works perfectly. No process forking.



Haven't been following php in years, but from back in the day I remember many different approaches trying to introduce threads and none could guarantee safety for the fundamental reason that the language itself is implemented unsafely. The runtime was done in C with unsafe features from the start. So process forking was the only sane reason to run php. I don't know how much of that is still true, though.


still, no proper multithreading, in comparison with Java, C#, Elixir...


Define proper please.


No native support for concurrency operators, no real event loop implementation, lack built-in support for non-blocking IO... I do Elixir regularly and Actor Model is not something PHP developers know


> I do Elixir regularly and Actor Model is not something PHP developers know

/me clutches pearls

What a travesty! I wish, I, a lowly, stupid PHP developer was smart enough to know about the Actor model!

/s


Look into ReactPHP, Swoole and Spatie


Is this just a long way of saying it doesn’t have “async” because threads are a perfectly fine concurrency primitive that you can build event loops on top of.


There is async in PHP


Not being a BEAM language is not unique to PHP or it's relevant peer languages.


"No true Scotsman," I'd wager.




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

Search: