For all its flaws, PHP and Perl are the only web languages that let you build a web app in _whatever_ fashion you want.
This extreme flexibility coupled with mature libraries makes web app development ridiculously easy. For a complex application that starts at ground zero I would probably recommend Ruby or Python but really even that decision is 50-50. We've faced this crossroads 3 times in the last couple months and 2/3 we've gone with PHP over Python, and not just cos of familiarity.
For any existing app, it's probably already in PHP or something worse like ColdFusion, so migrating it to "good" PHP 5.x is usually the only logical step.
That said threading, namespaces, sickening magic and the whole haystack/needle needle/haystack game SUCK. But you can get everything done quick and everything will scale and if you need to change it you know you always can without tearing down a house of cards so ... I for one don't mind it, in fact I quite like PHP and the PHP ecosystem.
This extreme flexibility coupled with mature libraries makes web app development ridiculously easy. For a complex application that starts at ground zero I would probably recommend Ruby or Python but really even that decision is 50-50. We've faced this crossroads 3 times in the last couple months and 2/3 we've gone with PHP over Python, and not just cos of familiarity.
For any existing app, it's probably already in PHP or something worse like ColdFusion, so migrating it to "good" PHP 5.x is usually the only logical step.
That said threading, namespaces, sickening magic and the whole haystack/needle needle/haystack game SUCK. But you can get everything done quick and everything will scale and if you need to change it you know you always can without tearing down a house of cards so ... I for one don't mind it, in fact I quite like PHP and the PHP ecosystem.