Earlier quoted context omitted.
The compilation step, and the resulting binary, is also very useful if you need to distribute your software. As opposed to creating a ZIP file. There are tools for creating stand-alone executables from PHP source code, but they're not as nice to use, compared to languages that were designed for this. By distributing software I also mean making your latest code live in prod. I suppose the benefit of using PHP (or othe…
Correct. I had a use case where I needed to run an app on 30,000+ servers and the app would be updated regularly with new features. I wasn't going to use PHP for that because it would involve not only copying the PHP binary around (and maintaining that version), but also my own app code. golang ended up being a perfect solution because I could cut the binary down to about 3-4 megs with compression and build flags. Mo…
Go with PHP
481–490 of 532 posts
Re: Go with PHP
#482Earlier quoted context omitted.
Being able to host for free on dodgy free hosting is hardly a benefit anyone should care about.
Might be useful for teenagers / people with no disposable income to start trying web related stuff from a public library.
When I was a teenager I used to host sites on an old android tablet. These days if you have a credit card, you can make use of the free plans most platforms have and free credit, especially if you have an .edu email.
Re: Go with PHP
#483I always dislike the "requests per month" metric because it seems like a transparent attempt to impress with a larger absolute number: 500k requests/month is 5sec per request, which feels pretty underwhelming
Placing an order from the Web will almost always involve multiple requests.
Re: Go with PHP
#484I've been using PHP for about 19 years and what I can tell is that both the language and its community have evolved the right way. Writing modern PHP is a joy, IDE support is great and we have tools for everything. Modern PHP is about community standards, not about any particular framework and exposing Laravel as the best way to get started with PHP is questionable. I wouldn't recommend it to anyone wanting to learn…
Honestly asking. Haven't written PHP in over 20 years.
Re: Go with PHP
#485Earlier quoted context omitted.
Use the right tool for the right job. I always use plain PHP for all those things I want to keep running forever without having to spend time and brain space to maintain. You can't beat putting a file on a LAMP server and forget it's running. I have tons of public endpoint that do all sort of stuff , aren't core to my business and don't want to deal with the operation hassle that would come to keep such framework wor…
Sounds like a scripted and slower (not trying to diminish) version of Go.
He just drops a PHP file in a folder and be done with it, it just works.
Re: Go with PHP
#4865 seconds per request isn't anything to shout about in 2023.
Re: Go with PHP
#487Earlier quoted context omitted.
Don’t forget to deploy all that code to the edge. Your $5 VPS in NY running both nginx and MySQL is going to be a huge bottle neck when somebody in Texas tries to view your simple website and it takes .10 seconds longer to load. You’re going to want that contact form code on at least 1,000 servers worldwide for maximum benefits and conversions.
Joking aside, as someone who runs their entire saas off a single bare metal server in Las Vegas, I have been toying with the idea of pushing some stuff to the edge. The reason being, sometimes those average load times are not giving you the real picture. If my average load time is 560ms per request because 90% of requests are 400ms and 10% are 2 full seconds, that might be a problem. Fixing those 10% requests and bri…
Re: Go with PHP
#488Earlier quoted context omitted.
If you're going to pull numbers out of a hat at least provide some evidence, especially evidence based on a comparable workload.
I actually wrote a whole article about this myself: https://alicegg.tech/2023/02/06/4dollar-vps.html TL;DR: go can handle 1000+ RPS on a ridiculously small server
Maybe (probably) Go is still faster than PHP, but the hyperbole is being pushed a bit too far here.
Re: Go with PHP
#489Earlier quoted context omitted.
The issue is that there is so much configuration that it’s basically coding. PHP frameworks are all bloat. It would have been much better to abstract things in a way that you actually spend time on features not thousands of configs.
Then use lumen, it comes with laravel.
> Note: In the years since releasing Lumen, PHP has made a variety of wonderful performance improvements. For this reason, along with the availability of Laravel Octane, we no longer recommend that you begin new projects with Lumen. Instead, we recommend always beginning new projects with Laravel.
Re: Go with PHP
#490Earlier quoted context omitted.
Most of them? 500k per minute is around 8k reqs/sec. $6 will get you 2 vCPU, so each CPU only needs to handle 4k requests per second. I'd at least expect that to be possible in Node, and would be somewhat surprised if a Go or Rust framework didn't hit that mark.
I think 4k requests per second is quite ambitious even for native languages or garbage collected languages like Go. Hello world will work, but once parsing, validation, and database queries get involved, you'll need some beefier hardware to get those numbers. I can't get the cloud benchmarks for 2022 to work (a dedicated PowerEdge is the standard physical benchmark and that's not very realistic here), but according t…
My point was that the article quotes orders per month, while other systems are quoting requests per second. I found it funny that they tried to mask the low speed by using big numbers.