PHP Sucks: So What?
ilikekillnerds.com
ilikekillnerds.com
Either PHP doesn't suck because it does the job better then others in certain areas (which I'd happily admit). Or it sucks and should be replaced. Everything else is a programmers Stockholm Syndrome.
It's a logical sleight of hand, but logic doesn't tolerate that. You may be willing to pay the downside cost, but that doesn't mean the downside cost doesn't matter or doesn't exist. There's no way around the fact that language quality matters.
And I for one don't have too much trouble finding non-PHP web work. I doubt I'm alone.
We were a small studio making websites. There were enough customers, and my income depended directly on how many "projects" I could do in a short timeframe, so naturally, I wanted to do more, faster.
Of course, PHP was the easiest way to achieve that goal. I would take a CMS, slap the design onto it, write some php and javascript code to make it behave as expected, and voila. The client was happy, my boss was happy and I got paid, but I was not happy at all, because the whole thing was soul-crushingly boring, stupid and I had already learned enough of a decent programming language to understand the shortcomings of php and be irritated by them.
When I got an (unpaid) internship at a real company offering work on more interesting (non-web) projects, I left that php sweatshop as fast as I could, without ever looking back.
Point is, if you want to spend the rest of your career slapping around icky php code (like my 17-year-old self), then by all means, learn nothing, talk about how it's the result that matters and do your best to keep your horizons as narrow as possible. good day.
If that statement is correct (I don't know), it is an argument to not do PHP professionally if you are concerned about income. Better target a market with a lower suppy.
> PHP is cheap to host
This used to be true in some respects. Free webhosts often offered PHP as the only scripting language but the offers were often severely limited in which extensions were available and in other respects. Deploying a moderately complex application often was work for a day [1] - which translates to at least two years of paid hosting on a decent hoster. Ruby on the contrary used to require specialized hosting or a dedicated server. With the rise of heroku, this point became moot.
> cheap to find decently priced & skilled programmers
The lesson I took from being technical lead for a 50+ dev team is that it's easy to find cheap php developers, but they often turn out to be Net Negative Programmers. Decent PHP programmers take decent salaries (just as decent ruby/python/java programmers) and - as every decent programmer - are quite well capable of picking up other languages in a short amount of time. If you're just doing "standard websites" cheap developers might be just what you need though (you could go for cheap rails developers as well, they exist).
> quick to code in if you know what you’re doing
There were times when I considered myself a skilled php programmer, but compared to what I can churn out in ruby, php flat out looses. There are too many beartraps and tarpits that you can step in, borked php configurations or stupid bugs ruining your whole day [2].
[1] figuring out how the borked configuration influenced the application, finding workarounds, ... [2] I recall this one costing me hours and hours of head-scratching https://bugs.php.net/bug.php?id=40691 (I love the "This is intended behavior" comment)
Someone tell this guy to stop embarrassing himself, seriously.
Hosting, for example, is a breeze with PHP because of the wide support on budget hosts. However, devs typically follow 5-year old workflows and FTP their changes to the site. Heroku and the like did not exist for PHP for some time and perfected the ease of deployment and hosting better than budget hosts could.
I still develop primarily in PHP and JS everyday, and the majority of my code is all about the architecture of the app and domain models. PHP's quirks are never an issue when the bulk of your work is with abstracted objects.
PHP can be elegant with frameworks like Symfony2 and Doctrin, which in my opinion, hold developed and their pull-requests to extremely high standards for th PHP community.
The coder and the architecture have much more to do with the elegance or "suckiness" of a language.
I run my own network of sites, and almost all webmasters I also work with all know the ins and outs of php. Its just quicker and more efficient to code in php. But on here and a few other sites php gets a lot of flak. If i'm ever asked how to get started in programming I'd always recommend php (or maybe JS) because it is very simple and there are so many resources for it.
We all should try to improve it.
Python and Ruby are exactly as easy to host and arguably easier to find skilled programmers for.