
Lets talk PHP - morog
The HN community is clearly (in general) anti-PHP. If HN was all you read, one would get the impression that PHP is a dying language with no jobs available for developers. This seems to be the opposite of what I have seen (as a mid-level dev with .NET &amp; PHP experience). My 12 year old nephew is starting out his coding career with Javascript and I want to get him some experience with server side languages too where he can immediately get hacking on some real world examples (and not just &#x27;hello world&#x27;)<p>Lets see...the most popular (and best) CMS - Wordpress is PHP, most of the popular open-source e-commerce platforms are PHP (Woocommerce, Magento, etc), the biggest social network is PHP (Facebook), the best open source Dropbox competitor is PHP (OwnCloud), then we have Wikipedia, Moodle, Limesurvey...it seems the best competitor for commercial incumbants is an open source PHP projects every time...<p>So can someone illuminate me why the HN community is so anti-PHP, and why my nephew might not get a job when he finishes school (in 5 years) if all he knows is PHP &amp; Javascript?
======
krapp
PHP (and javascript to an extent) is a very mainstream programming language
with a low barrier for entry, and isn't associated with academia, engineering
or intellectual cachet. PHP is a 'lowbrow' language, and a lot of people on
Hacker News want to status signal as 'highbrow', so they act like hipster
elitists towards it.

Some people stopped using PHP years ago and either aren't aware, or don't
care, that it like other languages has evolved and improved over time.

Some people don't like its inconsistent syntax and weird edge cases and...
yeah, fair enough. Some people want a cathedral and find PHP a bit too bazaar.

My opinion - use PHP if you want to, don't use it if you don't, but being
emotionally invested in negativity towards a programming language is silly
either way.

------
coldtea
> _So can someone illuminate me why the HN community is so anti-PHP_

Not everybody is. Mostly newbs who think it makes them look smarter if they
bash what's unfashionable (though for people who code in JS, to badmouth PHP
as a bad language is rich), and holier-than-thou types, who value purity over
pragmatism, and have never created anything substantial anyway.

People who code in C or C++ for example, have produced working products, and
know all the bad areas and deficiencies of their languages but appreciate them
for the results and pragmatism they allow, would think twice before bashing
PHP for not being some perfect language.

------
coolguy4
PHP is a pain to work with. It doesn't have the tools that other languages
have. The libraries available for PHP tend to be buggy or poorly designed.

The market for PHP developers isn't going to go away, but if you work
somewhere that is using PHP there is a good chance you won't be working
somewhere with a strong engineering focus. So you probably won't have great
people to learn from and you will limit your growth as a software engineer.

~~~
velmu
PHP is not perfect, but there has been definite improvement. Tooling is now
pretty good with PHPStorm (from JetBrains), Composer is a fine
dependency/packet manager and a framework like Symfony sets good guidelines
and stability for development.

In addition eCommerce and Content Management System tools and ecosystems are
still by far the most popular out there. After years of Node.js hype there is
still nothing that rivals WordPress in terms of flexibility and ease of use.
Same goes for Magento on the eCommerce end. Not that WP or Magento are good
examples of high quality codebases.

All that said, there are no longer arguments why you would use PHP
specifically. In that sense it has lost it's edge and you can use any number
of languages for developing CRUD apps for the web. But if you need to get shit
done, there is nothing wrong with PHP and your customers couldn't care less.

------
fiiv
I stopped doing PHP years ago (php 5, if I remember correctly). At the time,
here was my beefs with it. I don't know if they're still true since I moved on
to greener pastures (and have had no trouble finding work, by the way, so your
nephew will be fine too).

\- I did not like relying on web server software to handle routing in my
applications

\- There was no nice way to handle dependencies (I've heard there is now
composer but then there was not).

\- Redundant and useless modules. For example, several that handle XML, 2 that
do Mysql, etc.

\- Inconsistency. Can't recall the specific instance of this but two similar
functions would work identically but accept arguments in different order.

\- Messing with php.ini was disgusting.

I still know a webdev who works in PHP (Laravel specifically) and he tells me
the language has improved a lot. I'm happy for him, but I have no desire to
return.

Since then, I've worked with Node.js, python, ruby and elixir and am really
glad I've had that experience.

