PHP is popular, for the same reasons JS and Wordpress are popular.
They are:
- Intuitive, easy to use (think apple products)
- Popular and it’s easy to get support.
- Web hosts provide it for dirt cheap, ASP.NET+Windows hosting would be a lot costlier, plus a really deep learning curve for the framework. If the same noobie tried picking up C++ or Java, as if it were PHP, they’d be in a world of hurt.
PHP just works, it because popular not in regards to its flawed design decisions but how easy it solved problems. JS suffers many of the same problems. The different with PHP is that there are alternatives and yet, it still remains the king of server-side programming languages in general (because the other solutions are more complex).
C++, Java, C# were all carefully designed languages and enforce that you learn real programming concepts to get something up. They are also more commercialized solutions, which means they are not for the majority. The only way for something to overtake PHP (and be elegant), is for it to be as available, cheap, and intuitive.
I have deep knowledge of HTML and CSS and I’m learning different languages (MooTools, PHP, Python, will be picking up C++, SQL as well). I want to try my hand at solving problems in each and see what appeals to me when it comes to solving different types of problems.
Python is personally my favorite language in general, but I’ll be developing web applications in PHP for some time. If you’re disciplined and learn good coding habits, you can engineer great code. Just don’t copy and sling, try to UNDERSTAND why you make decisions in your software.
Write bad code first, then write it less bad.