> So what language is actually better suited for the job that PHP is used for all the time
I am not here to bash PHP although it might come off a bit like that. I have two answers depending on context:
1) If we mean, "better" at creating "professional" server-side web applications
Depending on your definition of "professional", the answer would be pretty much any other language commonly used on the web. This would include Ruby, Python, Java, C# and others. I think that the reason most people deride PHP is because it's natural style and internal inconsistency does not meet their definition of "professional".
2) If we mean, "better" at cranking out dynamic web pages with a minimum of theory, infrastructure, ceremony, and magic then PHP stands almost alone (which is probably your point). It is worth pointing out though that the primary reason for this is because almost everybody else has abandoned the inline script style of web development. For example, both ASP (Microsoft) and JSP (Sun) are years behind us but both were very PHP-like.
If I remember correctly, Microsoft Web Pages (their Web Matrix intro environment) is a lot like PHP but without so many of it's warts. Also, you can at least mature in that environment to a full ASP.NET MVC paradigm with reasonable continuity. You can do it on Mono as well if you want Open Source. That statement might cause a flame war so I will just point out that Microsoft themselves use Mono in a few places (including tryfsharp.org and some apps/games in the iPhone App Store as examples).
Of course, the PHP community is quite diverse and there are, for example, MVC frameworks available for PHP. At that point though, the uniqueness of PHP goes away. Other than already knowing PHP, I am not sure I see the advantages of a PHP MVC framework over choosing something else.