38
snayski
7y

I just started a new job where PHP and JavaScript are the primary languages. I came from a position as a firmware engineer where I coded in C/C++. I'm learning PHP as I go. I don't see why everyone hates on PHP. I find it extremely powerful. Especially when used in an object-oriented context.

Comments
  • 5
    I have to deal with php as a mediator between a Android application and a MySQL DB, and personally find it very powerful too, there's a plethora of problems that I could solve with php alone.
  • 7
    PHP is great. I'm with you.
  • 2
    Because most people use it in the context of hacked up Drupal 6 or WordPress programs with a million plugins. If you're using PHP7 the world is a bit better but there's still plenty of pain to go around. The CGI model of running a script on every HTTP request is just not fitting for today's internet. A lot of work has to be done on PHPs end to hide things like database connection pooling, and if you're lucky like some of us, you'll find that the approach for doing so for MongoDB somehow takes out your entire Mongo cluster by repeatedly creating new connections indefinitely.
  • 3
    yaay, lets give php the love it deserves!
  • 1
    While everyone here is be partially right in that the majority of that hate is due to a herd mentality, there will always be people who hate certain languages, and I dislike php.

    Why? Because ASP.NET with razor syntax does the same things but better. It has oop, and also strong casting and MSFTs packages, and i feel the code is cleaner (wtf is up with $ everywhere...). Finally my biggest quip is that displaying a variable in C# is as simple as typing @var_name. No <? echo $var_name ?>. Makes the code so much more cleaner.

    Sure it's not open source, but that doesn't matter too much to me (razor is now discontinued, but before it was my argument was solid).

    TL;DR: I don't hate it, but I do believe C# razor is a better option, so it's just inferior IMO (with the MO being the most important bit, as Thurs is purely a matter of taste).
  • 1
    @Artemix or use smarty {$var} ;-]
  • 0
    Love it. Since 5.3 a propper language, since 7, blowing it. (Well there's wordpress, but we've all been jung, stupid and in need of money..
  • 1
    There was once a time when I needed to create a windows gui application. I googled "PHP GUI" or something similar, used the tech and wrote a huge, 100% non-web program in PHP.

    Why? I'm not sure. But I always favored PHP.
  • 0
    Not even Rasmus Lerdorf likes it (but he's not even a programming fan at all)
Add Comment