3 ms·
> PHP is on the decline. Is it? That has been discussed here at every PHP release, recently with 8.1. PHP is getting the job done, runs everywhere, is fast and
by ofrzeta 4y ago
> PHP is on the decline.
Is it? That has been discussed here at every PHP release, recently with 8.1. PHP is getting the job done, runs everywhere, is fast and it becomes more safe with every release. There are modern frameworks like Symfony and Laravel (also take a look at PHP application servers Swoole or Roadrunner). You can even run a version of serverless Laravel, if you like (https://vapor.laravel.com/ https://vapor.laravel.com/).
For realtime there is Laravel Broadcasting that can use services like Pusher or self-hosted alternatives like Soketi. Symfony supports Mercure.
Honestly, what are you missing?
- phplovesong 4y agoFor starters a simple websocket server cant be built in traditional PHP. It will need some sort of hack like reactphp, and then you throw out all the stdlib i/o functionality. In 2022 (soon 2023) "it runs everywhere" does not matter. Who deploys on a shared hosting service anymore? I did not even know they existed anymore. With docker you can deploy any kind of exotic stack and "it will just work". PHP is not fast, a stock Laravel/Symfony app has poor req/sec benchmarks compared to almost anything else out there. Also the language still has all the warts it did in PHP5. Eg array_map/filter etc param order, no real unicode support, poor namespacing etc etc. Its just an overall bad development experience.
- ofrzeta 4y agoGuess what: Soketi isn't written in PHP.
- jayflux 4y ago> is it? According to GitHub yes https://octoverse.github.com/2022/top-programming-languages https://octoverse.github.com/2022/top-programming-languages Usage also declined year to year on the Stack Overflow survey.
- ofrzeta 4y agoOh, well, so it's declining according to Github stats. So is Ruby in this ranking. I like Python (which is ascending) but I don't think it's "better" than PHP according to whatever metric. Hey, I even like Java; Javascript not so much, not to talk about the ecosystem that comes with it.