PHP was the undisputed king of easy webapp development, until Ruby on Rails, Django, and other dynamic programming frameworks appeared. What are, in your opinion, PHP's strengths against the newcomers?
Deployment is a big one. Write your code, upload, and it should run on most every web server.
Also, since PHP isn't a framework there's a lot less to learn to get started.
It depends on what you are trying to do as to whether PHP has an advantage.
RoR for example generally is both the UI and backend, PHP can serve very well as a backend only.
So, if I have a WinForms client it can interact with a database through the php scripts, so I limit who can get to my database. So the php client can be written in any language.
RoR (Ruby) and Django (Python) are hard to compare with PHP as the first two are frameworks that make web application development easier.
You could compare ASP.NET and PHP for example, but ASP MVC and PHP would also be difficult to compare.
Deployment is definitely a strength of PHP.
However, it also ships with a lot of batteries for writing web applications. The syntax and namespace pollution that python and ruby people make fun of make for a simpler experience for new developers.
And it gets TONS of new developers because there aren't just frameworks for PHP, there are applications. WordPress, Drupal, Joomla are all huge and that's just the tip of the iceberg. Each of these systems has a huge ecosystem of "PHP Programmers" who start out by cutting and pasting some code from a blog post and learn from there.
Along the sames lines, since it starts out as an HTML file, it's a great environment for doing very simple sites where you just want to inlude some files or whatnot. Think of it as super SSI.
All that said. For doing applications, real-honest-to-god applications, instead of websites, I'm not sure it has any significant advantages beyond deployment and market traction.
Scalability is always a challenging issue, but I suspect it is easier to scale a PHP web application than its equivalent Rails or Django applicaton.
PHP is not a framework. You could compare the Zend Framework to Ruby on Rails and Django.
I don't have experience with Ruby or Python, but I've worked with PHP and the Zend Framework for a year now. Of itself, PHP is a terrible language. It has morphed and changed through the years, but still has most of it's old functions and procedural style. The nice thing about a PHP is that many operations are very quick out of the box, but most frameworks will provide that for you anyways
PHP's maturity as a language. Look at the number of successful international websites that are implemented (at least for the most part) in PHP, example: facebook.
As of November 2006, there were more than 19 million websites (domain names) using PHP.
Php ranks fourth in the Tiobe programming community index for 2009
This is not really a programming answer, but it's worth pointing out that the relative popularity of languages is a pretty good indicator of how vibrant their respective communities are - which means better learning and support through the sheer abundance of information.
Firstly PHP is not a framework, its a language.
IMHO the strongest point for PHP frameworks (apart from deployment :) is the huge and mature community. RoR and Django are fantastic tools with devoted but limited followers.
RoR has been greatly imitated in the PHP world, with CakePHP being almost identical, eliminating any need for a PHP developer to switch to Ruby.
Django is one of the few gems out there but personally I am in love with Zend Framework.
There are great tools for any of the major languages, and as you cannot compare a framework with a language you can't decide on a framework if you don't decide on your language first.
Ruby, Python, PHP and (even) Perl are essentially the same for a person with strong computer science skills, and in the end the choice depends more on personal style and programming roots than which one is "better"...
Anyhow, my point is that removing Java everything else is a perfectly logical choice. ;)
Procedural PHP is incredibly easy to learn, especially compared to Ruby on Rails, if only for the fact that you can (until you learn better ;) ) embed it right into your HTML.
To work with RoR you need to understand MVC etc.
There are a few advantages of PHP. One is the ease of deployment, you write your script and upload. Done.
Another is the huge function library, with support for SQL databases, JSON, XML parsing, cURL, calendar calculations, all libraries to make the life of the developer easier.
PHP itself is a template system. That's why I never understood the need to use things like Smarty, with the alternate colon syntax.
<?php
$fruits = array('apple', 'orange', 'banana');
?>
<ul>
<?php foreach($fruits as $fruit): ?>
<li><?php echo $fruit; ?></li>
<?php endforeach; ?>
</ul>
PHP also doesn't force a design pattern on you. If you'd like to use MVC, go for it. There are a few frameworks that allow you to so. On the other hand, you can write a single-file script in 10 minutes if you really need to. It's about flexibility.
On top of all that, there's the availability of years worth of code, tutorials, examples, and experienced people to go to for help.
It's easy to replace a developer and change code location. However, the disadvantage of its popularity is you must filter good solutions/developers from the lame ones - most of python or ruby developers are not 'script kiddies' (of course there are some, as everywhere) while the programming entry level in php is much lower and you must be very selective when looking for programmers and code snippets.
Another good side is that many of its flaws are well known, the docs and forums are full of comments, and it's easy to get quick advice.
The very subjective (as I said above) strength is its' popularity...
Regardless of all above, I don't get why many mention that php is 'mature', being old enough does not result being mature, php is far from being mature and consistent, it's philosophy is a denial of matureness. It doesn't mean you cannot make a mature application in php though, it's not a matter of what language, more a matter if you know how to use it. Can you write strong and mature apps in php - yes. Is php strong and mature as a language - IMO no.
Easy to get started
If you know HTML, here's how to start using PHP:
1) Change your filename to .php
2) Add an include statement to stop duplicating your menu code on every page
Assuming your web host supports PHP, that's it - one line of code does something powerful for you.
Having worked with PHP for several years (several years ago) I'd have to say that there's very little that PHP has that's an advantage. Others point out deployment... I'd say it's about even with the other web platforms out there. Others mention the language itself, to which I say bullocks. PHP is one of the worst out there. It's very easy to shoot your toe off with PHP, and very difficult to build decent, reusable components with. PHP is great for Hackers, i.e. the original sense of the term: hobbyist programmers, but it's crap for Software Engineers, i.e. anyone who cares about things like coupling, cohesion, quality and reusability.
Probably the only real advantage IMO is that it's ubiquitous; you can find a LAMP(hp) stack for uber-cheap with unlimited pretty much everything all over the web these days. There are dozens and dozens of hosts to chose from. Compare that to Rails or even ASP.NET hosts -- there are less hosts, and they're usually more expensive.
PHP's biggest advantage and its biggest disadvantage are one and the same: ubiquity.
PHP is the dominant language on the Web, so it's easy to find a host that supports it and it's easy to find a "developer" who knows it.
Unfortunately, because it's the dominant language and thus the weak-minded* will gravitate toward it, the vast majority of PHP developers and hosts seem to be pretty terrible.
Also, PHP (just by itself) is just a language, and thus offers more flexibility but a lot less support than Rails or Django, which are frameworks. There are frameworks for PHP as well, of course, but any framework will decrease the flexibility you get from the relatively blank slate that is PHP.
*
Note about the "weak-minded" thing: I just mean that the less talented and/or motivated tend to gravitate toward the dominant platform — no matter which one it is — not that anyone who uses PHP is stupid.
I think PHP's Web Frameworks compared with Ruby on Rails and Django would be right comparision. Only real difference is programming languages used in these web frameworks. PHP is more popular (today) then Ruby or Python, much easier to learn and deploy thats main advantage of PHP over these two, got better libraries as larger community behind it and you can easily find multiple learning resources. On other hand Ruby and Python are considered as better programming languages, you will be using these languages in their web framework. PHP and its web framework are good for certain projects but got some serious design flaws, while ruby on rails and django are better for complex projects. Most of the Rails and Django developers were php prgrammers, that might explain. PHP is simple for simple jobs, Rails/Django is simple for tough jobs.