4 ms·
This is such a shallow elitist comment. A lot of the common criticisms levied at PHP have been corrected years ago, and PHP is responsible for hundreds of billi
by 0xy 6y ago
This is such a shallow elitist comment. A lot of the common criticisms levied at PHP have been corrected years ago, and PHP is responsible for hundreds of billions of dollars of turnover globally.
Of the top 10 websites in the world, PHP is partially or wholly powering more than half of them. Wikipedia, Wordpress, online retail.
I have personally created 6 figures of value because I could quickly dump some PHP scripts on a VPS server and start doing business.
My employer makes billions with PHP. It's not perfect, but it's rock solid for gigantic businesses.
Sure you can build yourself perfect shiny web services using modern bleeding edge languages, meanwhile businesses using PHP for decades are innovating and printing money daily.
- throw_m239339 6y ago> This is such a shallow elitist comment. A lot of the common criticisms levied at PHP have been corrected years ago, and PHP is responsible for hundreds of billions of dollars of turnover globally. So does Java, Python, C and C++. This is also a shallow argument. No language is perfect but PHP still suffer from the same design issues a 10/15 years ago, none of them have been correct and it's perfectly valid to point that out. > My employer makes billions with PHP. It's not perfect, but it's rock solid for gigantic businesses. And with C, since PHP is written in C and probably whatever fronts your PHP applications, and with Javascript because you sure ain't running PHP on the client and so on and so forth...
- jonwinstanley 6y agoPHP is a great fit for the web, always will be. There are “better” languages and solutions but they are usually more difficult to setup or not as easy to learn.
- throw_m239339 6y ago> PHP is a great fit for the web, always will be. There are “better” languages and solutions but they are usually more difficult to setup or not as easy to learn. Talking about shallow comment you could say that from dozens of languages that have saner foundations. > There are “better” languages and solutions but they are usually more difficult to setup or not as easy to learn. No they are not more difficult to set up, not in the era of containers and PAAS. Of course if you still rely on Go Daddy for hosting, it might be...
- ptx 6y agoHow is it a great fit for the web, compared to other languages? All its unique strengths (in this very narrow context) are being phased out: 1) It used to be loaded straight into the Apache process as a module, which made it very convenient to get started with but required terrible broken hacks to run multiple applications/users separated from each other in a secure way. But nowadays people are switching to PHP-FPM, which is the same approach used by Python, Java and most other languages. 2) Every possible extension baked right into the language as a global function instead of using namespaces and a package manager like other languages. But nowadays people use namespaces and a package manager, just like in other languages. 3) Templating as part of the core language (in fact the core language is a templating language) so you don't need a separate templating library like in other languages. But nowadays people use separate templating libraries, just like in other languages.
- francislavoie 6y ago> But nowadays people are switching to PHP-FPM, which is the same approach used by Python, Java and most other languages. What? Not even close. You can update PHP code by just replacing the files, it's not compiled. PHP-FPM is just a layer that provides a fastcgi interface and manages processes that run PHP. It's super easy to run, super easy to proxy to with Caddy or Nginx or whatever else support fastcgi. Java is compiled, and typically runs its own HTTP server. Python is not compiled, but usually it runs its own HTTP server, or a WSGI server which adds another layer. > Every possible extension baked right into the language as a global function instead of using namespaces and a package manager like other languages. Are you trying to say that global functions are a strength? Namespaces are a big improvement. Many modern PHP extensions provide namespaced classes now, it's mainly the older ones that don't.
- nucleardog 6y agoOne of our acquisitions was one guy with no real background in tech working over a few years in his spare time and turning a project into a multi-million dollar business competing well against other entries in the market put together by teams of a dozen or more actual developers with millions in VC funding. And that was a project originally targeting PHP 4 and, by the time I was brought on, had made it all the way up to 5.x. I mean, yeah, the code is garbage, but if he weren't allowed to write garbage code _he just wouldn't have written the code at all_. If that guy had to sit and learn proper paradigms and server administration and a bunch of other stuff, he would have just gone out and done something else instead. Yeah, PHP lets you write shitty code (though it also lets you write _good_ code...). But in lowering the barrier to entry as it does, it also lets people who don't know how to write great code turn their ideas into reality. Unlike the suggestion of another comment, I've got a great deal of experience with "saner" languages, but despite PHP getting a bad rap because of its low barrier to entry I still admire PHP as a great equalizer.
- pietrovismara 6y agoHow can you call this elitism? Nobody forces you to learn PHP, you can learn any of the many other open source existing languages. There's no gatekeeping preventing you from learning languages other than PHP. I'm just calling it for what it is: a broken tool. I'm suggesting we let go of this broken tool and focus on tools that already work great, instead of wasting millions of human work hours on sub-par coding. Sure, you can still make billions with broken tools, but you could also have done that more easily with the right tools.
- codegeek 6y agoWhy is it a broken tool ?
- nix23 6y ago>I'm just calling it for what it is: a broken tool. Thats what every Rust-Fanboy says about the C/C++ Ecosystem
- 0xy 6y agoI've seen companies decimated by refactors to new shiny technology. Security, scalability and ease-of-use is practically solved in PHP. PHP is inherently stateless, making it easy to scale up. Facebook has had pretty close to a 100% availability rate since launch and PHP is still responsible for large swathes of their functionality. Most people attacking PHP read a snarky article written in 2012 about PHP's limitations and cannot actually provide reasoning for why it's so awful. Wikipedia, huge portions of online retail, forums and Facebook. Are these things inherently less secure or available than companies with a "modern" stack? Not really, in fact pretty much the opposite. I'll let you in on a little secret: your customers could not care less about your shiny modern stack. As long as it's not preventing performance, security and new development then they don't care. My PHP endpoints respond in <100ms, which to my customers is perceptionally instantaneous. They wouldn't benefit from any shiny modern language at all (but I do use them).
- oblio 6y agoVBA or Excel formulas are responsible for at least as much. They're actually great technologies, but for a very specific scope. Once you're outside of that strictly restricted scope, they're objectively horrible from an engineering point of view. The standard example is building a database with Excel + formulas. There is a point in this whole thing. Some technologies should whither and disappear, slowly, over time, so that better one can take over. Or they should remain in their very narrow niches. For PHP I'd venture that it should remain a language for hobbyists creating personal home pages. Related to this, standard, fixed column, steering wheels also were probably responsible for hundreds of billions of dollars of turnover globally. But I'd still want my car to have a telescopic steering wheel, airbags, and all the modern safety features you find in a car. The old school fixed column steering wheel should only be seen in museums or in classic cars out on the road with a special license.