From time to time, I like to read articles and discussions from general community sites such as StackExchange, Quora, Reddit, etc. about anything in general, not necessarily about web development, but any topic you could think of. There was a time that I was looking around for some answers that are WordPress-related and then I found a couple articles I bookmarked that made me think a bit. It’s not about WordPress itself, but it’s about PHP:
- Programmers @ StackExchange: Why is PHP so hated?
- Quora: Why is PHP hated by so many developers?
- Reddit: Why do so many developers hate PHP?
- Mailchimp Blog: Ewww, you use PHP?
- Fuzzy Notepad: PHP: a fractal of bad design 1
Even though I am still learning web development from Javascript to PHP 2 to anything else like Ruby, Python, and (lately) Go, the rants and the reasons developers gave to their abhorrence to PHP is something that I don’t understand until I finally get the grasp of basic computer science/programming. But, from a development student/self-learner’s view, I could think of a few reasons why:
- PHP still remains as (one of) the most popular web development languages to this date.
A lot of official sites (business, informational sites, etc.) are built in PHP and still being built/maintained in PHP. Most of them are powered by WordPress, which has become the most widely-used CMS/blogging platform even to this date. Like any other programming language, there’s always going to be outdated flaws and bugs as time passes. That’s why PHP, like other languages, have different/upgraded versions, to fix these bugs, deprecate features no longer needed for something new, and so forth. 3 - There are a lot of insecurities (like SQL injections) that (some) PHP developers don’t catch or even bother fixing on their scripts.
There’s always going to be a lot of insecurities on any web development language. I say this because non-web development programming languages (like the ones used to build computer software, online MMORPGs, etc.) would end up being broken into by hackers/crackers, and that’s why there’s always different versions and bug updates to fix these. A lot of PHP scripts that we see floating around the net are side projects for web developers to help them learn and understand the language more. 4 I could say that it’s a tactic that developers would do for money (donations, etc.), but that’s not the case with the folks behind WordPress. No programming language is perfect, after all. - Most (if not all) shared web hosting services support PHP in their servers, not so much with other languages.
Proof of this is software suites like Softaculous. Most web hosts have Softaculous or Fantastico that offer free popular scripts for beginning web designers/developers (as well as seasoned ones too) for faster web development for themselves and/or for their clients. What annoys these anti-PHP developers is that they’re all built in PHP. For me, there are some scripts that I would love to use/try out for my future sites that aren’t built on PHP (for example, building a blog platform using Ruby (on Rails)), but I couldn’t upload them in my web server because my host servers don’t support Ruby (on Rails). I needed to have some kind of permission from the web host to see if they can install Ruby (on Rails) support in their servers, which in turn, can cost money too. - (Professional) web developers are elitists.
I admire web developers for finding flaws on the said programming language, but to me, that’s not a good enough reason to just hate on them. Because PHP is so popular, everyone interested in getting into web development want to learn PHP instead of other languages. During my time at Skillcrush, I studied WordPress site development, but they don’t have any specific classes dedicated to PHP only. What they do have is a specific blueprint dedicated to Ruby on Rails. In their WordPress blueprint, we learned about WordPress, basic theme development with basic PHP, 5 and basic plugin development. There’s also this pride thing going on with some web developers who are already in the industry, where they fall in love with one or a few specific programming language that when others start to catch on, their pride and glory suddenly gets hurt and that their PHP projects would become a competitor of sorts to their own PHP projects. Therefore, many of them switch to other languages, build something really cool, and then show off to the world tht “this project runs the same as this PHP-based project, only better,” etc. etc. - In-demand non-PHP web developers get paid a lot more.
In addition to that, if you know/are an expert on a particular web programming language that isn’t as popular as PHP, you get paid a lot more. Ruby (on Rails) developers, from what I learned through industry-related articles anyway, have an average salary of $100K/year (as well as Javascript developers, Python developers, Go developers, etc.). Possibly even more. What these money-grubbing developers don’t understand till this date is why PHP is still around and why people who continue to develop using PHP still get paid a lot.
The thing is because there are so many different languages out there, that should all depend on which language is more comfortable for a developer to use to build their projects. As a learner, I’d like to learn Javascript (because it’s required for front-end web development along with HTML and CSS), PHP (because of WordPress), Ruby/Ruby on Rails (because a lot of cool web apps like GitHub are built using Ruby), Python (because professionals say it’s the easiest language to learn for non-programmers… 😶), and Go (because Hugo is built using Go), and probably more. It’s not because I want to be some web development expert know-it-all of programming languages, 6 but I would like to discover for myself to see which one of these programming languages would I find more comfortable with using.
WordPress?
The big news as of late from Automattic is that the latest versions of WordPress will be based on this new (?) thing called REST API. Their REST API (still in development) is completely unrelated to PHP, as it was developed using JSON, 7 which is developed using Javascript. Many web developers are seeing this move as a sign of WordPress conversion from PHP to something else other than PHP. 8 That time is still way far ahead of today, but I look forward to WordPress’s development and see what path I should choose in order to prepare for this moment.
There is also an article that is pro-PHP, but anti-WordPress (via the writer’s comments with others). I bookmarked it for future reference.
Conclusion?
Learning web development, let alone just basic programming, from a non- developer’s standpoint, is becoming a lot more difficult to learn, even though experts are saying that learning web development and basic programming is becoming easier and easier. Not necessarily true. In the end, it all depends on the person and the methods that person is most comfortable with. I don’t feel that there is such thing as “the best programming language” in the world, because eventually some years ahead, another programming language will be introduced and then it would be the same debate over and over again.
Before PHP, there was CGI/Perl. It used to be the “standard” language for creating web scripts (the old Ikonboard forum script, the old Greymatter blog script, etc.) before PHP came into the picture. And during that time, there were bashers of CGI/Perl stating how bad that language was compared to PHP. Today, we’re seeing the same history repeating itself, with PHP being “the worst language ever” and being compared to others like Ruby, Python, Go, and even Javascript. Some 10+ years from now, the same thing will happen again when a brand-new language gets introduced.
But, sorry to the haters out there, but PHP still lives on today. I don’t think PHP will die down very soon.
On the sidenote…
- Keep in mind that the writer is ranting against PHP, NOT towards (specific) people who use PHP. It’s the same aim as my previous entry. Read the comments in that article too if you have the time. ↩
- because of WordPress… ↩
- PHP just recently released PHP7, but PHP5 is still widely used right now. ↩
- Not to mention they’re being offered as free and open source scripts. ↩
- which I still don’t understand, by the way… ↩
- unless if you’re some super learner, there’s no way you’d be able to learn all of them and then become an expert of all of them anyway… ↩
- Javascript Object Notation ↩
- Notably towards Javascript through node.js. ↩
June 25, 2016 @ 6:35 pm
I personally don’t hate php, I actually find it to be very useful. Although I don’t really like working with databases in general, not every php thing requires a database. I think I don’t like databases because they’re data centric by nature and not very visual in comparison to html, css, php and js, and I’m into the artsy side of things. ^^
What I’ve been hearing for years is that js isn’t safe, that it’s too easy to manipulate because it’s not server side and that many people choose to disable it. Even after hearing that I still appreciate the interactivity of js and because I prefer to write my own scripts, that will make them stay simple, but also I’ll know exactly what goes into them. Smaller scripts are easier to keep track of and keep secure, and for what I like to do, which is mostly front end, it’s all I really need. XD
I’ve seen a shift in recent years, that has brought more openness to js. I’m not sure if browsers have become better or if js has received more recognition for it’s interactive usefulness. 😀
June 25, 2016 @ 7:12 pm
Javascript really evolved big time with all those crazy frameworks out there (jQuery, Angular, Meteor, React, etc.), but it’s still a front-end/client-side language. What only makes js become backend is Node.js (with the database being Mongo DB). I also like flat-file PHP scripts, as they are more secure than the ones backed up by databases like mySQL (though databases are actually easy to learn. I found them easier to understand than PHP LOL :D). But PHP 5.3+ and PHP 7 made the database security a little bit better with the introduction of mysqli and PDO drivers. A lot of the known small PHP scripts like Enthusiast still have the old mysql driver in them which is now deprecated because of its insecurity. Another reason why I want to learn PHP aside from understanding WordPress theming better LOL.
It would be nice though if more shared/VPS hosting sites would provide more support for other languages like Ruby, Python, Go, etc. Most professional developers purchase cloud hosting for their servers because cloud hosting supports all languages, but they’re pretty pricey.
June 27, 2016 @ 11:01 pm
I remember first starting out with Java Script to make mini games. XD They were small and simple, but I had fun making them. One of these days I need to study more JS, one day when days last 50 hours. ^^;;
June 28, 2016 @ 11:00 am
I heard that Javascript is easier now with those numerous frameworks like Angular, React, etc. I actually saw someone trying to write a CMS/blogging script that’s completely made out of Javascript (node.js) and MongoDB, but I don’t know the progress of that now. ^^ You should start making games again. I just purchased a Unity Engine class at Udemy for $10 (on sale) LOL. ^^