Live data from Hacker News

We Don't Hate PHP

hologram.io

1–10 of 85 posts

Re: We Don't Hate PHP

#2
Sorry guys,PHP is the outdated! (From someone who start PHP in 2000 with PHP 2.0 and is still reading lastest Laravel code source). To young people: choose your language wisely, you don't need to know PHP to be successful in Web dev

Re: We Don't Hate PHP

#3
Those all seem like features any modern programming language has. Nothing here particularly distinguishes PHP from the rest of the crowd. I don't think anyone is surprised by the fact that PHP has classes and some niche methods integrated in most standard libraries.

I would like to go one further and say most other more modern programming languages do each of these better. It's always a good idea to look what is beyond the horizon.

Re: We Don't Hate PHP

#4
People who hate PHP-- or even worse, hate other people for writing PHP-- generally don't have anything of value to add to the criticisms of PHP. They just dismiss the language entirely, link to 2012-era blog posts about its imperfections, and never bother to see if anything was fixed in PHP 7 (or, as of the end of this year, PHP 8).

This kind of toxic mentality doesn't produce better code, and it sure doesn't produce better coders. It's just free-floating hostility and gatekeeping.

Here's a few parts of PHP that improved in the past 6 years:

* Static type declarations (and return types, and strict typing, ...)

* Composer has become the de facto package manager for the PHP ecosystem

* Better cryptography (bye mcrypt, hello sodium)

* High quality open source libraries (i.e. Guzzle)

And I haven't even reviewed all of the changes coming in 8.0.

Re: We Don't Hate PHP

#6

People who hate PHP-- or even worse, hate other people for writing PHP-- generally don't have anything of value to add to the criticisms of PHP. They just dismiss the language entirely, link to 2012-era blog posts about its imperfections, and never bother to see if anything was fixed in PHP 7 (or, as of the end of this year, PHP 8). This kind of toxic mentality doesn't produce better code, and it sure doesn't produce…

I think it's fair to say that PHP was okay, historically, but with hindsight, I wish I would have moved on sooner.

I made a lot of money on PHP code. But then realized there were other languages that I could also make money on, that worked better for what I needed. But would I go back? No..

Re: We Don't Hate PHP

#7
The part on database access is not a plus for php. Writing sql like that is horrible, especially when it's simple. I'm in a huge refactor right now, where i'm utilizing postgres schemas and doing it with php, like in the article would be absolutely horrible.

Re: We Don't Hate PHP

#8
After reading the PDO section, I started to wonder if the author has used a language other than PHP. How can PHP have the best database integration if the best example you can show are simple prepared statements?

Re: We Don't Hate PHP

#9

The part on database access is not a plus for php. Writing sql like that is horrible, especially when it's simple. I'm in a huge refactor right now, where i'm utilizing postgres schemas and doing it with php, like in the article would be absolutely horrible.

What part? Prepared statements or migrations? Both pretty standard stuff in all languages so I would like to understand what your alternative is.
Post reply on HN