@Daniel: I don't agree with your debugging criticism. If you're using "echo" to debug a complex project, you're doing it wrong. Use a server-side debugging setup, and you'll see its equally powerful to, say, Visual studio debugging.
On topic: I can't argue about PHP's poor language design, but I do want to put it in perspective. In two parts, a technology part and a business part.
Technology-wise, many (semi) professional PHP applications nowadays are built upon pretty good PHP frameworks, most based on the MVC pattern. It's a valuable pattern to learn, as it is used across languages and platforms. These frameworks do quite a nice job in somewhat enforcing seperation of concerns and within each layer, helpers and utilities are offered to help out at a detailed level. When applied correctly, you'll usually end up with a PHP application that is maintainable, which is a major improvement from the typical HTML/PHP spaghetti PHP was known for.
Looking at the kind of applications one builds with PHP, they're usually data-driven websites. Typically you will not find a lot of business logic or processing in these applications. As such, only some core aspects of PHP the language are "touched", such as string manipulation. While that exposure may be a nasty one, it is a manageable one. It only takes a few projects to know the ins and outs and to work productively with it, despite its shortcomings.
Business-wise, nobody cares that PHP is a poor language. Nobody cares that something is "not enough OO" or doesnt have namespacing. What makes PHP a business success? Here's my view:
- It's a gettings things done platform
- It's widely available
- Staff is widely available on the market
- It's cheap
- It has a low learning curve (well, not really if you "proper" PHP)
It delivers. This doesn't mean other platforms don't, it just means PHP delivers and that makes the world go round. I think you will have a hard time building a relation between any of the supposed technical shortcomings of PHP, and actual negative business outcomes. And therefore, those shortcomings are not important enough for an alternative.
None of this changes the fact that PHP as a language sucks. I welcome its successor. You could opt for Ruby, Python, anything as a better language but I just want to say it needs to become as widely available as PHP. With that I don't mean hosting. There's more aspects to it. A very important one is the job market. You could become a kick-ass Ruby specialist but depending on your geographic location, the job market for that may be tiny or non-existant. We need something way better than PHP but it also needs to be as widely available in every aspect that matters.