Adams actually makes some very valid arguments in this PDF. People like to argue the superiority of languages, but at the end of the day if the result in PHP is the same as it is in Ruby & Rails, Java, .NET or whatever, does it really make what the language is? Another good point is the efficiency of a developer working in PHP. The language is easy, it's so easy to be a PHP master after a few years working in the language. It's easy to find super-talented PHP developers compared to any other language.
I like the idea of opt-in typing for PHP via Hack which you can enter by beginning your PHP code with <?hh — Facebook have essentially taken everything that is wrong with PHP, every complaint that someone has ever published in a blog post or bug report, forum or IRC channel and built it into an improvement of the language.
PHP isn't going anywhere. It might be one of the oldest web languages, but I think the PHP space is starting to get better with Facebook's contributions to the language, Laravel 4 being a solid PHP framework and we can't forget that most Yahoo! products are built using PHP as well (even the recently acquired Tumblr is coded in PHP). Flickr! is probably one of their biggest PHP applications.
Event hough Facebook appear to have resolved the many complaints and problems of PHP, I am sure people will still find a way to complain about the language that powers most of the web...
Are the complaints about PHP even controversial? The built in library functions are a mess, and mostly terrible. The syntax and basic language are overly verbose and have layers upon layers of cruft. The type and object systems are grafted on, and have so many gotchas and inconsistencies that it takes many months to understand enough of them to be very productive in the language. The aspects of PHP that were intended to make it simple (like pretending types don't exist) actually make it more difficult to reason about precisely. I don't think anyone who knows anything else would ever choose PHP for a fun personal project.
Despite this, there is nothing in PHP that prevents you from doing the thing you want to do, however you want to do it. As projects become larger and involve more time and people, the fine grain of line syntax fades out of view, and all that is left is the large scale design decisions, which are similar in any language. And this is what ultimately determines the technical success or failure of software.
I code in Python, BASH, C, and PHP on a regular basis and still strongly prefer PHP for everyday coding and hobby tasks. I even prefer to create command-line scripts in PHP (though will switch to Python if it's large to begin with). For me getting Flask to work properly under NGINX + uwsgi was such a hassle. Having to tell it what module, and hooking things up to touch versus just passing to PHP under fast cgi.
To be honest, PHP is really just simpler, less hassle, and if you know what you're doing things come out structured well. Just stick to classes (Including statics! There shouldn't be a define() anywhere.), use namespaces, use composer (I've come to really like it), and use a coding standard.
Deployment, for one. sudo apt-get install Apache and PHP, then edit the Apache config to say, "use this directory." I love Django and Flask to pieces, but deploying a Python app is like building a hovercraft compared to PHP.
I have no problems deploying a django app with gunicorn. It's a simple command line statement, and deployment is always an intricate thing, unless you don't have to worry about ssl certs and secrets and keys, and managing access, admin pages, etc etc.
I'm going to say it, better documentation. I don't know, maybe it's just me, but I find it takes me significantly less time do find out how to do something in PHP, or a PHP library than in the corresponding Python. Though, there are obviously exceptions to this.
I don't think it's less of a hassle than PHP, but in the context of web development, it is. In PHP, your development environment is often very similar to your production environment.
I think the primary difference is PHP is web first: it was designed to be a language for the web above all. Everything else is tacked on.
On the other hand, Python is useful for a whole array of problems and a website is just one problem you can solve with it.
> I don't think anyone who knows anything else would ever choose PHP for a fun personal project.
I would. For every job, a proper tool. If my project is client-side heavy and only needs a thin layer between the client-side and the database, I'll pick PHP. The code I would write in PHP would be minimal and I would get it up and running very quickly.
If I'm writing something substantial on the server-side, then yeah, you may want to consider something else.
I think it's exceptionally easy to become productive in PHP quickly and to reason about the code despite all the warts and gotchas. The good points about PHP raised in the slides (statelessness, etc.) hugely simplify thinking about code, offsetting the bad stuff and then some.
Doesn't make me want to give up python or node, but these are strong points in PHP's favor.
> People like to argue the superiority of languages, but at the end of the day if the result in PHP is the same as it is in Ruby & Rails, Java, .NET or whatever, does it really make what the language is?
At the end of the day, every program is a stream of bits too. That doesn't diminish the importance of programming languages as a tool for reasoning, managing complexity and avoiding common mistakes.
As the industry shifts from deliver something that sort of works to deliver something with these assured characteristics, programming languages designed around enforcing desired qualities will be of immense value.
> Another good point is the efficiency of a developer working in PHP.
Compared to what? Depends on the developer and problem domain.
> The language is easy, it's so easy to be a PHP master after a few years working in the language.
You can master any language after a few years.
> It's easy to find super-talented PHP developers compared to any other language.
I like the idea of opt-in typing for PHP via Hack which you can enter by beginning your PHP code with <?hh — Facebook have essentially taken everything that is wrong with PHP, every complaint that someone has ever published in a blog post or bug report, forum or IRC channel and built it into an improvement of the language.
PHP isn't going anywhere. It might be one of the oldest web languages, but I think the PHP space is starting to get better with Facebook's contributions to the language, Laravel 4 being a solid PHP framework and we can't forget that most Yahoo! products are built using PHP as well (even the recently acquired Tumblr is coded in PHP). Flickr! is probably one of their biggest PHP applications.
Event hough Facebook appear to have resolved the many complaints and problems of PHP, I am sure people will still find a way to complain about the language that powers most of the web...