20

Why does everyone hate on PHP so muchπŸ™„

Comments
  • 28
    The answer is in the name...

    P - People
    H - Hate
    P - PHP
  • 2
    Do you know why the old php function names are so inconsistent?
  • 1
    Because they haven't found Stefan Mischook's YouTube channel.
  • 4
    Because the first hashing function for function names was the length. In order to have as less functions as possible have the same hash the php-creator got creative with naming conventions to have every function have a different length. Php was built as an instable house of cards and never lost that completely.

    Even today it's so easy to shoot yourself in the foot with php. Look up the percantage of vulnerable wordpress plugins. I guess that's enough to justify my hate for php.
  • 5
    @YouAreAPIRate so because of bad devs who used php wrong to create shitty and vulnerable plug-ins you're gonna blame the language? K...
  • 3
    @ScribeOfGoD ok, i get your point. That is more of a personal opinion.

    What about the array/map-frankensteins though?
  • 0
    @YouAreAPIRate 20years later, there r still debates on should you put underscore in front of js function or not. Inconsistent keeps programers alive.
  • 3
    @sunfishcc if what you say is true, the code i deal with at work makes me immortal
  • 2
    Because it use to be kinda shitty. The language grew from a set of cgi scripts into a language. And even tho it is really decent and powerfull now as well as fast it still carries the history of it. So its kinda bandwaggon mentality really. The language is perfectly fine in the hands of a skilled dev.
  • 0
    Yeah I personally think it's really useful, and the standard library is brilliant
  • 1
    @j4cobgarby you need to get out of that basement and try new and more powerful technologies!!
  • 1
    @Lem0nz I don't think I need anything more for my project
  • 0
    @j4cobgarby I didn't say that, I said you need to try new stuff, it doesn't need to be now!!!
  • 3
    People will always hate the top dawg. It's called envy.
  • 5
    tl;dr
    It doesn't suck, there are just many other, far better tools available.

    Short list off the top of my head:
    • Internal inconsistencies.
    • Language constructs that do not belong. (I'm looking at you, `(int)`)
    • Large amounts of unnecessary boilerplate.
    • A community full of terrible-yet-elitist devs, many of whom have never used any other language.
    • Hilariously bad security patches by the PHP-Core devs.
    • Many instances of unexpected behavior, such as those surrounding internal functions.
    • Behavior of all code on a machine relying upon / changing due to a single php.ini file / ini_set call ordering.
    • etc.

    I don't hate on php. I just think it's poorly planned, poorly built, and rarely ever the best choice of tool for a task. It works well if you're aware of its multitude of caveats, but there's enough of them to be rather daunting.
  • 2
    I'm not saying I hate PHP, in fact, I love it! But https://whydoesitsuck.com/why-does-...
  • 3
    It's a RAM eater... especially symfony the caching bastard with it's partner in crime doctrine the query cache fucker that caches classes... ...who thought that was a good idea? "Let's cache everything because we're using a short term process" thanks... and symfony's container... what a piece of shit. "Let's boot up all the things and pass all the things everywhere" yea thanks you really thought that through didn't you?
    I've been a PHP developer nearly 5 years. I'm bored of the problems. I'm moving to node. That or go. I've had enough of what people do to PHP. It's makes me cry
  • 4
    WHERES MY SYNTAX. I CANNOT LIVE WITHOUT MA SEMICOLONS ARRGKCJSPXCPFKDHDHXXHXJSKKXJC @irene
  • 3
    @irene I force my juniors to use semicolons in es6 with eslint πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚ they hate me
  • 2
    So erm what should I try next? I’ve been developing with PHP for 10 years and never had an issue with it? I’ve started with nodeJs over the past few years but everyone seems to be hating on JavaScript now as well. Is it just all web technologies people dislike πŸ˜‚ I’m not bothered by what other people think of PHP tbh just want a push in a direction of something new and useful to learn to advanced the career
  • 4
    To be honest. Its coming down to personal preference. In my experience I would pick the right programming language for You, your team, your workplace and the project. No use starting a new project in a new language if nobody can support it! Stick with PHP for a while. It's not dying just yet. PHP 7 was defo needed. Just find a framework that uses it well, usually community driven *cough* laravel *cough*
  • 0
    @RAZERZ is this your blog?
  • 0
    I actually still like it, I've dipped my toes into python CGI but I still prefer PHP. I don't currently classify many languages as 'bad'
  • 0
    @ScribeOfGoD

    "Blame the devs, not the language" isn't a valid counter in my opinion. When you have more than 10 developers in a company, they won't all be seniors.

    A language should enforce consistency and safety rules, not rely on the developer being perfect at QA. PHP has improved a bit with strict types and type hints, but there's still a lot of mess.

    @MikeyAlder Every language has haters. I think one issue is that webdev, by nature, is a "quick prototyping" thing. Great for general business interests, but it conflicts with developer perfectionist attitude. I personally think JS and Python are often preferable to PHP though, despite their own weaknesses. Go is very interesting as well. By contrast, Rust and Haskell are much safer, Iron and Yesod are awesome web backend frameworks. But not if you need a feature ready by the end of the week...
  • 1
  • 0
    @bittersweet I disagree, every language can be crap if the coder can't use it correctly :p that's why docs exist, to help you use it correctly
  • 0
    @bashleigh the junior devs could add a comment to disable forcing semi-colons in each file and be finally free
  • 3
    @whiteSparrow DON'T TELL THEM THESE THINGS!! THEY DONT DESERVE TO KNOW AFTER THE YEAR I'VE HAD FIREFIGHTING
  • 0
    @ScribeOfGoD Have you read the PHP docs though? 😜
  • 0
    "There are only two kinds of languages: the ones people complain about and the ones nobody uses. "
    - Bjarne Stroustrup
    😊
  • 0
    @repromancer have a link?
  • 0
    The language is too forgiving about its usage. It's so easy to make mistakes in php. But I still love it.
  • 1
    @emyu10 Lol, I didn't know this was his username, but here it is: https://youtube.com/user/killerphp/
  • 0
    @repromancer thank you loads
  • 2
    @lxmcf I shall quote you.
Add Comment