5 ms·
Some people think PHP is obsolete because it has been around for 20 years. Universities are usually teaching Ruby and Rails in their web programming courses (at
by ChrisCinelli 11y ago
Some people think PHP is obsolete because it has been around for 20 years. Universities are usually teaching Ruby and Rails in their web programming courses (at least in US). Not a lot of kids feel inspired to learn an "old" language that has always had a bad reputation. And yes, the early versions of PHP were quite a mess. The new generations of engineers prefer learning the newest cool technologies. Nothing wrong with that.
However PHP has become a lot better. Starting from PHP 5, it started feeling a legit language. Frameworks like CakePHP, Laravel and Symphony have shown that PHP is capable of competing with Django with Python and Rails with Ruby. Facebook drastically accelerated its runtime speed with the HHVM. And PHP 7 promises to be even faster.
What I like about PHP is how the runtime works:
- If something is messed up in a controller only the requests that hit that code will have problems. The whole application does not crash.
- The other thing I like is that you change a file and the change is immediately available without having to restart anything.
I love Node.js, C++, Go and Python but PHP is still a good tools in these days.
PHP is only obsolete for those that choose not to use it.
- entelechy0 11y agoI'd like some citation on the claim that Ruby and Rails is taught "usually" in University web programming courses.
- ChrisCinelli 11y agoStanford: http://web.stanford.edu/~ouster/cgi-bin/cs142-winter15/index.php http://web.stanford.edu/~ouster/cgi-bin/cs142-winter15/index... MIT: http://6.470.scripts.mit.edu/2015/schedule http://6.470.scripts.mit.edu/2015/schedule
- gautamnarula 11y ago> Universities are usually teaching Ruby and Rails in their web programming courses (at least in US). I wish this were the case. As an undergraduate in 2013, I took an intro web programming class where we were taught using Java and J2EE...in 2013! My friend went to a school with a top CS program (top 10 or top 20 in the country I think), and his web programming class was also in Java, though I don't remember if they used the horrid J2EE or not. As a side note, I learned more and made more progress teaching myself Python and Django in a week than I did in that class.
- bliti 11y agoWordpress also keeps php very relevant. Very, very relevant. You can make so much money focusing on WP that it's not even funny. Even with the endless marketing agencies and low cost options available.
- jv22222 11y agoAgreed. Wordpress powers 25% of all websites!
- wvenable 11y agoProgramming in PHP these days doesn't seem significantly different than programming in ASP.NET MVC or Node or maybe even Ruby. I started playing around with Laravel recently to throw up a quick site on some free hosting I have available and what tools does it require to manage the front-end: npm, bower, and gulp! PHP may be closer to death now than ever because it's becoming less distinct as a platform.
- waps 11y agoExactly. PHP has been "embraced and extended". The essential features of PHP I would say are easy database connectivity, and a built-in templating language. Both of these features are now present in pretty much every server-side framework and half the client-side ones (both angular and react have it). I would argue that they're both messy, but it's there, and heavily used. The big feature PHP still has that others are missing is the ease and cheapness of deployment. Any PHP app can be very easily deployed on shared hosting, which isn't true for ruby, asp.net, java, django or any of those. It is "more" true for asp.net and django, but not much more. This feature is more the result of PHP easily supporting shared hosting, which is something all the others fail at pretty badly (yes, Google and Amazon have implemented it in proprietary form ... that doesn't count. Needs to be open-source, easy to implement for cheap hosters). And really this boils down to efficiency. As ridiculous as it sounds, PHP is currently by far the most power/money efficient language. Why ? Because of thousands of cheap hosters easily implementing shared PHP hosting which usually works well, certainly well enough for the vast majority of small businesses. Ruby/Python/Go/C++/... none of them have anything like it. Right now efficient hosting is having a "root" dns entry pointing to Google app engine, and having an ec2/other cloud app that simply checks availability of 2-3 cheap hosters and 403's to one of them. That means you effectively have very cheap bandwidth (WAY cheaper than EC2 or any other cloud hoster), yet retain the reliability/availability you need. Biggest problem is keeping database in sync. I can't believe companies like Microsoft/Amazon are letting this opportunity slide, but they are (but of course that people use very power/cpu/money inefficient hosting kind of works to their advantage).
- jbergens 11y agoI think some things are connected. PHP does not have shared memory like static members. This makes it very easy to run in on clusters. No one cares if one server goes down and is replaced by another. This also makes it hard to write large systems that are supposed to run in a controlled cluster and cache things. Java and .NET are very good for those things. So PHP is good for the web hotels and Java and .NET are better for company IT/devs or any project where you can manage your servers for yourself (even if it is a cluster in Amazons or MS centers). I'm not sure what Microsoft i letting slide, they have PHP support in Azure and .NET support (and Node etc). More expensive that the lowest cost PHP web hotels but not expensive.
- zatkin 11y agoMy university still teaches with PHP.