When people recommend writing web applications in Python, they don't point to the language itself as being better for web development. They point to Django or web2py. Same for Ruby, with Rails. So it's odd that people talk about PHP itself in these same conversations. You can write web apps without a framework in PHP, but I don't think anyone building non-trivial applications is still doing that.
"Tons of problems and weaknesses" is largely untrue at this point. Many of the problems that were traditionally pointed to were corrected in 5 and 5.3. There is no interest in breaking backwards compatibility, so the built-in function parameter order inconsistencies are still valid. Most frameworks work around this issue with an OOP wrapper for array and string operations.
It is difficult to find good dev-power for PHP that's cheap. I've tried. You can find many people who have a basic level of PHP knowledge and refer to web apps as "scripts". Finding people who have an understanding of OOP and modern development techniques is much harder and more expensive.
Here's why I program web apps in PHP: it works and I know it well. If I need a library for something web related, I can assume it will be available as open-source. I don't have concerns that I can make a PHP application scale if I need to. When features don't make sense to implement in PHP, I'll snap them off and implement them in the most appropriate language in the background. Most of the heavy-lifting for web applications typically happens in the background.
I keep hearing about PHP's "function parameter order inconsistencies". Has that ever been a real problem for anyone? Guess not. Auto-completion got your back and it's debatable if these are real 'inconsistencies' anyway. The amount of really really helpful built-in PHP functions for a lot of common tasks more than makes up for this.
Definitely hear you on the lack of PHP developers with an understanding of OOP and all though. Seen it myself when my previous company tried to hire one, the 'range' of people applying is incredible.
Completely getting your point that it could be annoying for some people out there. It never bothered me though and while this is not really a strong argument, it's always one of the first things to come up when people talk about PHP's flaws.
If it really bugs you it could easily be solved with a few helper/wrapper functions.
(Besides that, regarding elegance of syntax, there's no doubt that most other languages used for web dev'ing are lightyears ahead of PHP.)
"Tons of problems and weaknesses" is largely untrue at this point. Many of the problems that were traditionally pointed to were corrected in 5 and 5.3. There is no interest in breaking backwards compatibility, so the built-in function parameter order inconsistencies are still valid. Most frameworks work around this issue with an OOP wrapper for array and string operations.
It is difficult to find good dev-power for PHP that's cheap. I've tried. You can find many people who have a basic level of PHP knowledge and refer to web apps as "scripts". Finding people who have an understanding of OOP and modern development techniques is much harder and more expensive.
Here's why I program web apps in PHP: it works and I know it well. If I need a library for something web related, I can assume it will be available as open-source. I don't have concerns that I can make a PHP application scale if I need to. When features don't make sense to implement in PHP, I'll snap them off and implement them in the most appropriate language in the background. Most of the heavy-lifting for web applications typically happens in the background.