23

Why is there such a big hatred towards PHP ? I have recently started backend dev in Laravel and it seems to be a pretty good framework. Most E-commerce frameworks are based on PHP as well. If PHP is so bad then why is it so widely used ?

I am not trying to defend PHP , but I genuinely want to know what's wrong with it ? I might switch to other backend tech then.

Comments
  • 14
    Back in the day, PHP wasn't a very great language. The language changed for the better but the hate stayed + people who have never used PHP jump on the hate train to be cool.
  • 12
    I guess it's more history related thing which became a strong meme.

    PHP is easy to learn. That's the reason why it was at some point very popular with beginners. Beginners though with limited knowledge on security etc. published apps with multiple security holes. PHP then got bad reputation on security.

    Earlier versions also had security issues in the language itself but those have been patched and long gone for several years (what I have heard, I don't dev with php).

    Also the issue with a lot of beginners doing PHP was that the codebases became spaghetti, and someone had to maintain those later. And that someone usually grew a strong dislike towards php.
  • 0
    And many compare the language only with other languages, never learned the that frameworks for php exists and/or remember the frustration when the üerson need to search the docs.
  • 3
    Also, PHP is old and for anything that old, there will be tons of outdated information and docs - and beginners are likely to learn the "bad old ways".
  • 8
  • 3
  • 2
    https://eev.ee/blog/2012/...

    i used to work with it years ago and i didn't like the language as much as VB. A friend recently told me to take a look at laravel. I was amazed at how it worked and the similarity it has to Asp.net MVC. Obviously some things have changed in the time.
  • 1
    In the past PHP was slow. Thats the main reason. Nowadays its as fast as the compiled version of PHP.

    But the inconsistency is what made me dislike it
  • 2
    PHP is the best available language to implement web apps if you know how to do what with it.
    It has powered great website since the earlier days and I think it was the first idea of making web dynamic. So it's a pioneer one.It's great unless you start mixing ui with backend. Use MVC and it goes great
    Atleast facebook says login.php
  • 0
    it's so widely used _because_ it's so widely used, and people don't often know of any alternatives
    oh, and it's easy to set up
  • 3
    To be honest: the only thing that's more annoying than the hate on PHP is people *constantly* asking why there's so much hate on PHP

    The answer is simple: because most people are opionated assholes, they've been hating on things for no justifiable reason since the dawn of time
  • 4
    To be fair, even in the "bad old days" of PHP, the problem was not that PHP was especially bad, but that PHP made it especially easy to do bad things, and to be completely undisciplined.
Add Comment