5 ms·
Not just the early 2000s - up until maybe 2010 or so (probably a bit later) PHP was the clear leader for anyone who wanted to get something done. There was Rail
by owenversteeg 5y ago
Not just the early 2000s - up until maybe 2010 or so (probably a bit later) PHP was the clear leader for anyone who wanted to get something done. There was Rails and ASP.net and Java (I don’t remember anything else that was super popular) but PHP was a million times faster to develop in. Anything you wanted was explained in depth in the first Google result. You want auth? A chat server? File management? You could get anything you dreamed of. The most amazing part was how it was so simple and actually worked. Nowadays you look something up, the first few examples are often videos, unnecessarily detailed blog posts, who knows. Then things don’t even work, because one of your dependencies is out of date, or something needs to be restarted, or your linting failed, or who knows what. PHP barely ages - from 1999 or 2010 or 2020, it looks similar and works fine. By comparison I can instantly tell what 4-year timespan any Javascript was written in, because ten trends and frameworks have come and gone and left their mark.
A simpler language for a simpler time.
- 29athrowaway 5y agoIf you need to cook an egg, you can serve 1 request per second with PHP and use your CPU as heat source.
- simon1ltd 5y agoOnly if your code is poorly written. Even on basic hardware, hundreds of requests per second are trivial -- assuming you aren't loading a bunch of files ("require") or making 800 trips to the database to load the site. I've never found PHPs performance to be a limiting factor, even when I was dealing with dynamic page loads coming in at sustained rates between 50 and 100 per second, and this was on PHP4/5, slow (400MHZ), single core, low ram system. FAMP stack. I assume Java apps are the same way -- I've never encountered (to my knowledge) a java-based website that wasn't slow. I assume anything that relies on a huge framework probably also had that framework to blame for most performance problems.
- progforlyfe 5y agoI prefer python or ruby, they cook the egg faster
- forgotpwd16 5y agoHow does perl compare?
- kyriakos 5y agoPerformance is the last thing one can blame php for. Its quite fast for a non compiled dynamic language and most bottlenecks are usually I/O and db access
- candiodari 5y agoExactly, if there is one thing that is to blame for cooking CPU's it's an ORM, and those aren't very typical to see in PHP at all.
- seanp2k2 5y ago+1, once you get the right indices in place, MySQL 4.x would scale just fine to millions of rows per table. Innodb and Percona were even better. Maatkit was amazing for tuning, as was xdebug. When you just had expensive queries that were already optimized, you’d use IPVS, haproxy, apache, or RR DNS to help. This was before nginx existed. Static caching pages using Perl scripts to crawl the site and write out everything static as html files worked well too. Varnish was a real game-changer when that came out. Edit: forgot about Gearman for distributing work as well. Now people probably build the same types of things using SQS and functions. PHP was never the bottleneck, and the web could definitely “feel” faster back then on hardware an order of magnitude or two slower than we have today with these >10MiB index pages, CDNs and parallel downloads be damned.
- hu3 5y agoIt's funny you say that. I was toying with PHP not long ago and managed to squeze 50k requests per second on an old server using a pure php server library called Workerman. And by squeze I mean copy 30 lines or so from their hello world tutorial and run: php start.php
- exikyut 5y agoI reimplemented the speedtest.net backend for fun a number of years ago, right around when it was transitioning from Flash to HTML5 and offered both. I used a PHP process running in the background using stream_socket_server(). IIRC my computer had a 5Gbps connection to localhost using HTML5, and fractionally less using Flash :> ...which meant that PHP was writing to the web browser at 5Gbps.
- cardanome 5y ago> PHP was the clear leader for anyone who wanted to get something done. Isn't that still the case? At least here in Europe the word Backend Developer is basically synonymous with PHP Developer. Every other language for backend development is pretty niche. Sure there is Java (and C#) for the enterprise but that was already there back then. Ruby had a good run but modern PHP with frameworks like Laravel could reclaim most productivity benefits so not that fierce of a competition. JS with node, sure but I mostly hear it in the context of micro services which is the opposite of wanting to get something done. > PHP barely ages - from 1999 or 2010 or 2020, it looks similar and works fine. Yes but no. PHP takes stability and backwards compatibility quite seriously but the language and culture around it has changed tremendously. The wild west days are long gone, it has gotten much more professional and mature while adding many modern language features.
- noir_lord 5y ago> At least here in Europe the word Backend Developer is basically synonymous with PHP Developer. Pretty much, I've seen PHP powering traditional companies with revenue in the hundreds of millions (approach billions).
- 8fGTBjZxBcHq 5y agoYeah my "niche" right now is consulting for companies that are high revenue but built out their platforms during lean times where they were focused on growth over stability, reliability, or security. "Legacy code" I guess though it's a little more varied than that might imply. Basically the only two technologies I touch these days are rails and php. I'm not filtering out other tech stacks, these two are just absolutely dominant for this type of company.
- noir_lord 5y agoSometimes not just "lean startup" type companies. The place I'm thinking off that I know uses PHP for everything is a bricks and mortar retailer/manufacturer, I think last time I looked their revenue was ~£500m a year. Their software was however awful in the worst ways :).