this article didn't even address by far the biggest issue with PHP: there is a massive and divided community that is split between real professionals (the guys who build Facebook, for example) and total amateurs who don't know what they're doing.
critiques centered on the weaknesses of the language itself are missing the most important problem with PHP as a technology ecosystem. the technically rigorous, experienced, professional part of the PHP ecosystem is a minority and the signal:noise ratio is horrifically bad.
Do you know what happens if you put up an ad on a job board looking for PHP developers? You get flooded with hundreds of amateurs or lackluster freelancers (many of whom have no idea how far away from "good" they are) and a very small amount of responses from good developers.
Do you know what happens if you google search technical questions about how to do stuff in PHP? Flooded with blogposts and forum threads filled with actively harmful information instructing you on the wrong way to do things, without having any idea about why its wrong.
Other languages don't suffer from these problems to nearly the same degree. There are issues in the Python, Ruby, Javascript, Perl, Java, C#, etc. communities as well. Those problems are not nearly as intractable and damaging though. The communities of other languages have better signal:noise ratios and its really evident as soon as you try to do any hiring. It makes a difference.
The signal:noise ratio is better in Javascript, Perl, and Java? I can't possibly agree with you there. There's a lot of bad PHP out there. But that's also because there's a lot of PHP out there. I wouldn't say the ratio is any worse. Any respectable PHP developer nowadays uses a decent framework, and there are many. It's pretty easy to discern who's legit and who's not by whether or not they use/understand these frameworks.
edit Why the downvotes? Am I not contributing? Or is this just typical irrational PHP hate? I'm not apologizing for it, I'm just talking from experience here.
It's a problem, but it's the very reason the language is as popular as it is. I started out as the total amateur copy and pasting terrible code to bring ideas that I had to life. I didn't care about code quality or security vulnerability. Having a broken app was, to me at that time, better than having no app at all.
Now it's nearly 10 years later and at some point I crossed over into being a professional. Now things like code quality and security matter. When I started out, it didn't.
Also on a side note nowadays search results almost always result in Stack Overflow answers - and while those aren't always quality answers either, they are far better than the random blog links you used to get.
There was a time where computers was available only to "the priesthood of computing." You had to be in a special group in a very big company (or military research setting). Because no one else understood these so-called electronic-brains, few could question you for anything involving The Computer.
I think PHP makes some developers frown because it represents an entry point for what they may consider the riffraff of developers. "Anyone can code now - if only a little!" <insert snobbish sniff here>
So developers chase off to increasingly intimidating technologies and languages not necessarily because they have SO much more to offer but because the culture represents a return to The Priesthood of days of yore.
A few centuries ago, "Don't know Latin? Get out!" and nowadays "Don't know Erlang? Get out!"
While at a PHP conference last year, which is the first I'd ever been to, someone did a presentation on abstract machines. At the end, there was a long applause, with many people commenting that the presenter was a genius for understanding these advanced topics. I was dumbfounded since these are topics which even a minimal CS education would cover.
Perhaps you would not have these problems if you accepted web development as a blue-collar trade that it is.
When you treat learning some tech stack as a pinnacle of intellectual achievement, your sense of identity becomes involved and you get this kind of nonsense.
Programming in general has a lot of corollary to blue collar work, in that it is where the actual work gets done after all the fussing about has been done. That this is somehow meant to be a negative thing or a slight on the intellect of programmers is telling about how misaligned the priorities of our society often are.
How do you figure that web development is blue-collar work? Even for hyperbole, this is quite a stretch. Whatever your intent was, it just comes off as elitist.
His argument is that PHP is better now that is not 2004, but also, you could say the same about PHP usage on big popular sites.
I'm tired of the argument of "every big site is written on php" cause it's not 2004 anymore and if those sites were to start today they'd probably be written on other languages.
He fails to mention that there is actually a fairly big amount of people that are horrible programmers and use, love, and preach PHP, they're not using Symfony, or reading Hacker News, or writing tests, still they're professional programmers.
I did PHP for many years before moving to Ruby and Rails and never looked back ... doing Ruby made me a much much better software Engineer and gave me a better understanding of Computer Science as a whole. Its not impossible to get this with PHP, but the fact is that the low barrier to entry actually works against it. There are way more amateurs screwing around and writing really bad code with PHP than you'd find doing Ruby, Python and (more recently) Javascript (wasn't always the case though)
PHP just has bad PR. It unfortunate, but its just the reality of the PHP ecosystem, and if you choose to program mainly in it, then its something that you have to accept and work hard to overcome.
Weirdly enough, I find quite a few startups/tech companies that I wouldn't expect to use PHP actually do. Pocket. Slack. for example then the usual suspects like Facebook and Automattic (wordpress guys). From my experience following Ruby on Rails from the beginning till now ... I think the these using PHP are doing the ecosystem a massive disservice by not blogging more extensively about the awesome things they're doing with it and getting more word out about the right way to do things. Thats the only way I see the perception of PHP changing.
Hey all, author here. You all are amazing and took down my website! If it's not loading for you, I put the post in a gist which can be found here: https://gist.github.com/jkup/dcaa56f1d066409d17f5
Maybe you need to restart apache every 10 requests?
(good article though ... I try to prefix my PHP rage stories these days with 'argh, argh, PHP3' so people realise I'm complaining about the past rather than the present)
What I hate the most about all these arguments is people always say that php people don't know shit about computer science. C.S. is important, but it's not what makes you a good programmer. Ultimately all systems have theory behind the underpinning technologies, but what makes a system powerful is how it's engineered at scale, and how code is maintained at scale. A house is about making sure all materials to build it are strong enough via scientific measurements & standards. You don't need to be a rocket scientist to know that if you don't use proper materials, everything falls apart. That is why if you write in langauges like php, they improve the C.S. part from the community, but also build frameworks which are the Software Engineering Technics encoded in documentation.
Ultimately, what makes people hate a language is how it engineers structures at scale, and ones which don't force the hand, people hate. PHP has recently frowned apon writing massive codebases without frameworks, and when it is a framework, they expect people to take the time to document their frameworks to a point where the community can take over and improve that product. Writing lots of non-domain specific code is a sure-fire way to find haters all day long.
Almost all modern php now is very heavily leveraged in package management & commonly used frameworks & best practice software engineering principles in the underpinning glue to the code.
Hmm, OK, I'm guilty of having the biases and preconceptions that he's describing. However, even after reading through his post and some of the articles he linked to, I didn't see anything that really changed my mind.
Even knowing that there are smart people at Facebook and Twitter using PHP, I just can't shake the connotations that those 3 letters have in my mind. I'll try to keep an open mind, but lord it ain't easy.
I don't think people at Twitter use PHP ... might be wrong on that though. From what I remember they started with Ruby/Rails and are now doing a lot of JVM stuff (Scala)
This is a fairly typical response (usually from C enthusiasts):
Me: "Hey, I'm working on some project. Anyone see any vulns?"
Person: "Yeah, I see a vuln: You're using PHP."
I don't like language arguments. While there's always value in contrasting language features and keeping your horizons ever-expanding, nothing productive comes from them. All it does is foster an environment that promotes Impostor Syndrome and insecurity. As others have said, they believe the people who engage in these "my language/framework is better than your language" diatribes are acting on their own insecurity. If they are correct, it's a vicious cycle that accomplishes nothing.
Better idea: Accept that no language is perfect, and if there isn't a way to solve a specific problem (or the existing solution sucks), research and write a (better) solution. Even if it means sending patches to the PHP core (and having to deal with the toxic jerks on the mailing list). This is far more beneficial than arguing with people who don't want to listen.
As PHP accelerates towards its version 7 release and cleans up a lot of the cruft from the 4.x and early 5.x days, a lot of the criticisms of PHP will cease to be applicable.
"Those who can, do. Those who can't, complain."
EDIT: If you're going to downvote me, please at least tell me WHY you are.
Cleans up a lot of the cruft, you say. Interesting. Would you mind taking a look at http://phpsadness.com/ and guesstimating how many of the first ten points remain relevant to PHP7?
If you base your identity on the language of the day, you are going to have a bad time when things change.
I am a developer. I develop in multiple languages, using multiple frameworks, with different technologies, to fill different needs.
Why would I care which language I am using for a project? The syntax is different and so are the built-in tools, but in the end, you are doing the same things.
Well, "base your identity" that's an exaggeration of course, but I think it's a mark of an insightful professional to have opinions about various tools of his trade, and some sort of taste. Rather than being the "just punch your card and go home" guy.
I don't like, say, C++ (let's http://cdn.meme.am/instances/500x/57005651.jpg for a sec...), so I'll stay away from it. This is one of the perks of being a software dev that the job market allows you to pick technologies that appeal to you, the ones you enjoy learning and using.
I like this viewpoint, but the problem is that it largely doesn't carry over into hiring where job postings are often for uber-specific skill sets, rather than for "somebody who can come and figure out how to do any of the stuff we do and all the stuff we'll eventually do but haven't thought of yet". It's just harder to hire for the latter, so putting "requires PHP / RoR / AngularJS / whatever" on the job posting is the easy road. There seem to be some indications that this trend is changing, so I'm cautiously optimistic.
PHP had many positives: (1) killer apps like Wordpress and PHPmyadmin, (2) PHP apps are easy to install and run on most stock *nix system, and (3) bare-bone PHP runs fast, compared to Rails or other framework (which is not a fair comparison, though)
Unfortunately, PHP has failed in: (1) lack of leadership and the vision -- they need someone like DHH or Linus Torvalds or the support of a major corporation such as Google (HHVM from Facebook not withstanding) (2) PHP still suffers from the lack of respect from software engineers and developers, and faced the same fate of VB6 (which I've had fond memories of doing "casual programming"), (3) future of PHP looks grim, despite the upcoming release of PHP 7, with the exception of Hack and HHVM, but Hack is not PHP.
I think you are wrong in stating php future looks grim, I think it all depends on what corner of the internet you are reading from. From where I am, I read reddit.com all the time, it's talked about extensively all day long. A language which gains no new features is one which is dead. I think python more than anything else is sort of dying.
If validation is the problem, then remember that most developers aren't on HN, and they aren't building startup apps. Also, I can't imagine a developer only knowing the one languages. Leverage other "cool" projects if you feel you really need some geek cred (Javascript MVC, CSS pre-processor like SASS or LESS, automate your builds using Chef, optimize developer experience using Vagrant, implement search using ElasticSearch, etc)
If all you've ever used was PHP and you haven't grown into using the other amazing tools that are available in 2015 (remember, "this isn't 2004"...) that's the bigger issue.
We use mostly PHP at work but lately I have been using my free time to learning Ruby because most good job offers around here ask for Rails knowledge.
I'm not saying there are no PHP job offers, there are, but they are mostly for maintaining old codebases that have none of the good features that modern PHP has. Or they are for web agency jobs that consist of mass producing cookie cutter web sites.
I think Laravel 5 looks very interesting but I feel I can't afford to explore it because I need to learn Ruby if I want a better job.
He's right though - most of the arguments about what PHP is lacking are outdated and obsolete by the massive community undertaking.
Most of the modern day arguments are just bikeshedding arguments. (Function names are inconsistent, etc.) which is, yes, stupid that we've managed to maintain mistakes for decades - in the end it doesn't matter.
What matters is being able to get things done, and that's something PHP developers are fantastic at - even if some of them output the worst code imaginable.
> What matters is being able to get things done, and that's something PHP developers are fantastic at - even if some of them output the worst code imaginable.
I had a car, once, where the driver's side seatbelt would pop out if I put on the brake, or leaned forward.
But hey, what mattered was that the car got me from point A to point B, therefore it was a perfectly great car!
I think associating yourself to a technology to the point of "end[ing] up in insular micro-communities" is the wrong approach. People shouldn't define themselves as developers based solely on one language (e.g. "I'm a php [only] developer"). I enjoy working with both low level and high level languages, with some more than with others, but they're merely tools. And no tool is the best tool for every problem.
We know why we chose a PHP for a project, how "bad" PHP is and can weight that against advantages it brings. We already know all the jokes and just do our jobs.
Also, I suspect some people do not get it when we say "it is not 2004 anymore". It REALLY isn't. We see and write this kind of code on daily basis:
Sometimes I really wonder, why everyone hates PHP? Sure, it's not the best language around to do complex calculations but it's very easy to write code there.
Even with the RFC process, php-internals still resists adding language features useful only to advanced developers.
The standard library is full of warts, including odd spelling, inconsistent argument order, etc.
The killer though, as mentioned in the article, it has a low barrier to entry, so lots of neophytes write lots of bad code in it. There's also a tremendous amount of horrid, obsolete code out there, written by people that didn't know any better at the time, and kept up because the internet never forgets.
PHP is far less of a joke than it used to be, but people will continue to hate on it and look down on people that make a living writing it.
It's easy to write code until you run into situations where you need more than a web framework. Got to run a job at midnight to pull in a daily dataset? You're probably gonna be heading for the python book, or the ruby book, etc, to actually get the work done. Even in big companies that "use" php, I'd be willing to wager a significant portion of their actual runtime is written in C and the like as extensions, because PHP the language is so slow.
This isn't even getting into problems with the runtime itself. PHP's treatment of every new request by giving it a brand new instance to run in slows things down considerably, because it has to do so much startup work -- creating database connections, etc -- before it can get going. Personally, PHP's ugliness is a death from a thousand papercuts sort of situation. Yes, no one feature is a killer, but all the little quirks add up to a language that is less useful and productive after a while.
[+] [-] metaphorm|11 years ago|reply
critiques centered on the weaknesses of the language itself are missing the most important problem with PHP as a technology ecosystem. the technically rigorous, experienced, professional part of the PHP ecosystem is a minority and the signal:noise ratio is horrifically bad.
Do you know what happens if you put up an ad on a job board looking for PHP developers? You get flooded with hundreds of amateurs or lackluster freelancers (many of whom have no idea how far away from "good" they are) and a very small amount of responses from good developers.
Do you know what happens if you google search technical questions about how to do stuff in PHP? Flooded with blogposts and forum threads filled with actively harmful information instructing you on the wrong way to do things, without having any idea about why its wrong.
Other languages don't suffer from these problems to nearly the same degree. There are issues in the Python, Ruby, Javascript, Perl, Java, C#, etc. communities as well. Those problems are not nearly as intractable and damaging though. The communities of other languages have better signal:noise ratios and its really evident as soon as you try to do any hiring. It makes a difference.
[+] [-] baggachipz|11 years ago|reply
edit Why the downvotes? Am I not contributing? Or is this just typical irrational PHP hate? I'm not apologizing for it, I'm just talking from experience here.
[+] [-] debaserab2|11 years ago|reply
Now it's nearly 10 years later and at some point I crossed over into being a professional. Now things like code quality and security matter. When I started out, it didn't.
Also on a side note nowadays search results almost always result in Stack Overflow answers - and while those aren't always quality answers either, they are far better than the random blog links you used to get.
[+] [-] Malic|11 years ago|reply
I think PHP makes some developers frown because it represents an entry point for what they may consider the riffraff of developers. "Anyone can code now - if only a little!" <insert snobbish sniff here>
So developers chase off to increasingly intimidating technologies and languages not necessarily because they have SO much more to offer but because the culture represents a return to The Priesthood of days of yore.
A few centuries ago, "Don't know Latin? Get out!" and nowadays "Don't know Erlang? Get out!"
[+] [-] dsp1234|11 years ago|reply
[+] [-] spacecowboy_lon|11 years ago|reply
[+] [-] mcfunley|11 years ago|reply
[+] [-] yetanotheracc|11 years ago|reply
When you treat learning some tech stack as a pinnacle of intellectual achievement, your sense of identity becomes involved and you get this kind of nonsense.
[+] [-] sanderjd|11 years ago|reply
[+] [-] thinkt4nk|11 years ago|reply
[+] [-] spacecowboy_lon|11 years ago|reply
[+] [-] igorgue|11 years ago|reply
I'm tired of the argument of "every big site is written on php" cause it's not 2004 anymore and if those sites were to start today they'd probably be written on other languages.
He fails to mention that there is actually a fairly big amount of people that are horrible programmers and use, love, and preach PHP, they're not using Symfony, or reading Hacker News, or writing tests, still they're professional programmers.
[+] [-] trustfundbaby|11 years ago|reply
PHP just has bad PR. It unfortunate, but its just the reality of the PHP ecosystem, and if you choose to program mainly in it, then its something that you have to accept and work hard to overcome.
Weirdly enough, I find quite a few startups/tech companies that I wouldn't expect to use PHP actually do. Pocket. Slack. for example then the usual suspects like Facebook and Automattic (wordpress guys). From my experience following Ruby on Rails from the beginning till now ... I think the these using PHP are doing the ecosystem a massive disservice by not blogging more extensively about the awesome things they're doing with it and getting more word out about the right way to do things. Thats the only way I see the perception of PHP changing.
[+] [-] jon_kuperman|11 years ago|reply
[+] [-] mst|11 years ago|reply
(good article though ... I try to prefix my PHP rage stories these days with 'argh, argh, PHP3' so people realise I'm complaining about the past rather than the present)
[+] [-] krob|11 years ago|reply
Ultimately, what makes people hate a language is how it engineers structures at scale, and ones which don't force the hand, people hate. PHP has recently frowned apon writing massive codebases without frameworks, and when it is a framework, they expect people to take the time to document their frameworks to a point where the community can take over and improve that product. Writing lots of non-domain specific code is a sure-fire way to find haters all day long.
Almost all modern php now is very heavily leveraged in package management & commonly used frameworks & best practice software engineering principles in the underpinning glue to the code.
[+] [-] thoman23|11 years ago|reply
Even knowing that there are smart people at Facebook and Twitter using PHP, I just can't shake the connotations that those 3 letters have in my mind. I'll try to keep an open mind, but lord it ain't easy.
[+] [-] trustfundbaby|11 years ago|reply
[+] [-] sarciszewski|11 years ago|reply
https://twitter.com/voodooKobra/status/494466665883910144
This is a fairly typical response (usually from C enthusiasts):
I don't like language arguments. While there's always value in contrasting language features and keeping your horizons ever-expanding, nothing productive comes from them. All it does is foster an environment that promotes Impostor Syndrome and insecurity. As others have said, they believe the people who engage in these "my language/framework is better than your language" diatribes are acting on their own insecurity. If they are correct, it's a vicious cycle that accomplishes nothing.Better idea: Accept that no language is perfect, and if there isn't a way to solve a specific problem (or the existing solution sucks), research and write a (better) solution. Even if it means sending patches to the PHP core (and having to deal with the toxic jerks on the mailing list). This is far more beneficial than arguing with people who don't want to listen.
As PHP accelerates towards its version 7 release and cleans up a lot of the cruft from the 4.x and early 5.x days, a lot of the criticisms of PHP will cease to be applicable.
"Those who can, do. Those who can't, complain."
EDIT: If you're going to downvote me, please at least tell me WHY you are.
[+] [-] Arnt|11 years ago|reply
[+] [-] krapp|11 years ago|reply
[+] [-] dscrd|11 years ago|reply
Well, if you like PHP, how could you like language arguments? After all, they always end up destroying your beliefs.
[+] [-] Raphmedia|11 years ago|reply
I am a developer. I develop in multiple languages, using multiple frameworks, with different technologies, to fill different needs.
Why would I care which language I am using for a project? The syntax is different and so are the built-in tools, but in the end, you are doing the same things.
[+] [-] V-2|11 years ago|reply
I don't like, say, C++ (let's http://cdn.meme.am/instances/500x/57005651.jpg for a sec...), so I'll stay away from it. This is one of the perks of being a software dev that the job market allows you to pick technologies that appeal to you, the ones you enjoy learning and using.
[+] [-] sanderjd|11 years ago|reply
[+] [-] datashovel|11 years ago|reply
[+] [-] otterpro|11 years ago|reply
Unfortunately, PHP has failed in: (1) lack of leadership and the vision -- they need someone like DHH or Linus Torvalds or the support of a major corporation such as Google (HHVM from Facebook not withstanding) (2) PHP still suffers from the lack of respect from software engineers and developers, and faced the same fate of VB6 (which I've had fond memories of doing "casual programming"), (3) future of PHP looks grim, despite the upcoming release of PHP 7, with the exception of Hack and HHVM, but Hack is not PHP.
[+] [-] krob|11 years ago|reply
[+] [-] bdcravens|11 years ago|reply
If all you've ever used was PHP and you haven't grown into using the other amazing tools that are available in 2015 (remember, "this isn't 2004"...) that's the bigger issue.
[+] [-] not_a_test_user|11 years ago|reply
I'm not saying there are no PHP job offers, there are, but they are mostly for maintaining old codebases that have none of the good features that modern PHP has. Or they are for web agency jobs that consist of mass producing cookie cutter web sites.
I think Laravel 5 looks very interesting but I feel I can't afford to explore it because I need to learn Ruby if I want a better job.
[+] [-] Navarr|11 years ago|reply
Most of the modern day arguments are just bikeshedding arguments. (Function names are inconsistent, etc.) which is, yes, stupid that we've managed to maintain mistakes for decades - in the end it doesn't matter.
What matters is being able to get things done, and that's something PHP developers are fantastic at - even if some of them output the worst code imaginable.
[+] [-] pavel_lishin|11 years ago|reply
I had a car, once, where the driver's side seatbelt would pop out if I put on the brake, or leaned forward.
But hey, what mattered was that the car got me from point A to point B, therefore it was a perfectly great car!
[+] [-] rootlocus|11 years ago|reply
[+] [-] nercury|11 years ago|reply
Also, I suspect some people do not get it when we say "it is not 2004 anymore". It REALLY isn't. We see and write this kind of code on daily basis:
https://github.com/symfony/FrameworkBundle/blob/master/Comma...
We do not deal with nightmare cases like this anymore: https://github.com/2b3ez/FileManager4TinyMCE/blob/master/tin...
So, please do not pity us. We know what we use and why.
[+] [-] MarioSh|11 years ago|reply
[+] [-] McGlockenshire|11 years ago|reply
Even with the RFC process, php-internals still resists adding language features useful only to advanced developers.
The standard library is full of warts, including odd spelling, inconsistent argument order, etc.
The killer though, as mentioned in the article, it has a low barrier to entry, so lots of neophytes write lots of bad code in it. There's also a tremendous amount of horrid, obsolete code out there, written by people that didn't know any better at the time, and kept up because the internet never forgets.
PHP is far less of a joke than it used to be, but people will continue to hate on it and look down on people that make a living writing it.
[+] [-] Sanddancer|11 years ago|reply
This isn't even getting into problems with the runtime itself. PHP's treatment of every new request by giving it a brand new instance to run in slows things down considerably, because it has to do so much startup work -- creating database connections, etc -- before it can get going. Personally, PHP's ugliness is a death from a thousand papercuts sort of situation. Yes, no one feature is a killer, but all the little quirks add up to a language that is less useful and productive after a while.
[+] [-] V-2|11 years ago|reply
If that doesn't convince someone that PHP isn't a pleasant language I don't think anything will.
(Its business value is another matter - that McDonald's is extremely successful doesn't mean their food is top quality...)
[+] [-] Socketubs|11 years ago|reply
[+] [-] issa|11 years ago|reply
[+] [-] issa|11 years ago|reply