News for hackers. Stuff that matters.
Re:A look at modern PHP by ainiriand on Tuesday May 05, 2020 @07:07AM (#23078689)
- 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.

Re:A look at modern PHP by bernawil on Wednesday May 06, 2020 @10:40AM (#23091467)
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.
Re:A look at modern PHP by kangoo1707 on Tuesday May 05, 2020 @07:12AM (#23078728)
still, no proper multithreading, in comparison with Java, C#, Elixir...
Re:A look at modern PHP by ainiriand on Tuesday May 05, 2020 @07:17AM (#23078756)
Define proper please.
Re:A look at modern PHP by kangoo1707 on Tuesday May 05, 2020 @09:48AM (#23079963)
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
Re:A look at modern PHP by macinjosh on Tuesday May 05, 2020 @11:23AM (#23080977)
> 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

Re:A look at modern PHP by Eremotherium on Tuesday May 05, 2020 @01:09PM (#23082280)
Look into ReactPHP, Swoole and Spatie
Re:A look at modern PHP by Spivak on Tuesday May 05, 2020 @10:57AM (#23080686)
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.
Re:A look at modern PHP by eithed on Tuesday May 05, 2020 @12:23PM (#23081729)
There is async in PHP
Re:A look at modern PHP by Can_Not on Wednesday May 06, 2020 @12:03AM (#23087801)
Not being a BEAM language is not unique to PHP or it's relevant peer languages.
Re:A look at modern PHP by Piskvorrr on Tuesday May 05, 2020 @08:37AM (#23079333)
"No true Scotsman," I'd wager.