News for hackers. Stuff that matters.
Re:Go with PHP by berkle4455 on Thursday May 11, 2023 @01:48AM (#35898136)
You're doing something terribly wrong. Sounds like caching isn't setup and your http -> php handler is cold booting the interpreter for every single request.

Check these Go vs. PHP benchmarks. PHP is quite fast and stands up nicely to the performance you get out of Go.

https://www.techempower.com/benchmarks/#section=data-r21&l=z...

Re:Go with PHP by kgeist on Thursday May 11, 2023 @02:21AM (#35898383)
Isn't that synthetic benchmarks for toy projects? The amount of code which is run on every request grows with the size of the project in PHP/Symfony (which can take quite some time in a huge monolith), while in Go, everything is usually initialized once at startup.
Re:Go with PHP by ki_ on Thursday May 11, 2023 @07:14AM (#35900568)
All i see is that the php fpm based frameworks (e.g. laravel) are 100x - 300x slower. And this is the best case scenario. When projects grow, php-fpm gets slower and slower. Which is not the case for go. Im not a go-fanboy, my entire carreer has been in PHP. Im just saying, PHP is one of the most terrible languages for web servers. And it's all php-fpm's fault. On top of that, the PHP community seems to promote OOP and SOLID which are the last design patterns you want to combine with php-fpm. There's a reason why facebook created their own PHP transpiler.
Re:Go with PHP by Thaxll on Thursday May 11, 2023 @09:54AM (#35902125)
This benchmark means nothing.