I am student and i am trying to be a good professional developer. I have seen with high frequency several criticism to PHP. Course, i already saw that PHP has a lot of defects, but other languages has yours defect too. So, why PHP is so hated? Is a bad idea study PHP?
Prior to PHP 5.x the language lent itself to writing terrible code that got the job done but little else. Consequently lots of very, very bad (unmaintainable, unreadable, overly complex, spaghetti code, untestable, and generally slow) PHP apps exist (I say that as a PHP coder with more than 10 years experience in it). The thing is though, as bad as the language is, the problems are really down to the developers - you <i>can</i> write good PHP code and you have been able for a few years. Some frameworks (CodeIgnitor, Laravel, etc) actually push you towards writing reasonable decent code - as much as Rails (Ruby) or Express (Node) at least.<p>I suspect if there were as many Ruby devs as there are PHP devs you'd have just as many articles decrying Ruby, when they really ought to be decrying bad developers regardless of language.
I've noticed that on HN, in particular, many commenters "dislike" PHP due to misconceptions or very outdated information they have about the language.<p>I've responded to people who didn't realize PHP has had first-class objects for years, has a very good community-driven package manager, is easy to unit test, scales very easily and very well, and has nifty features like closures and traits.<p>In short, it's mostly people who have no idea what they're talking about complaining about a language they've either never used or used years ago when it was completely different.<p>That said, there are a few people around here who have proper criticisms about PHP that doesn't center around "the order of parameters is too hard to remember!". YMMV.
It's definitely not a bad idea to study PHP. That being said, I tend to think learning anything is a good idea (even a bad language would teach you something valuable).<p>It would seem you're definitely conscious of the disdain toward PHP. I would certainly keep that in mind if you find yourself applying for a job. If you're going to apply to a trendy (uppity) start up in California, the kids there will probably laugh at you if you have PHP listed before Node.js.<p>Study PHP, but on a framework with some sort of built in architecture. It's possible to write entire apps with all of your logic spread out willy-nilly throughout the view.
Popular languages are always the focus of criticism. The more popular the language is, in terms of usage, the easier it is to find examples that you can disparage.<p>Here are some of the larger websites and what they use <a href="http://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites" rel="nofollow">http://en.wikipedia.org/wiki/Programming_languages_used_in_m...</a><p>As for studying it, I wouldn't make it the sole language in your toolkit but if you enjoy it study it.
Because php is widely used to make absolute ugly garbage. It may not be the language itself, but a lot of people saying: "hey I can write 10 lines of terrible php crap which somehow kinda works, I am web dev now!". There are tons of people out there like this.
PHP is hated if you are a Ruby developer and you've got nothing to do.<p>If you have the time, test RoR vs Laravel, that's a very good study :)