This is a very subjective question.No language is inherently better than another – certainly not languages that are so fundamentally similar. I’ve been working in PHP for a while now, and I can honestly say that it’s a bunch of shit to say that Python is faster or the PHP isn’t scaling. I’ve integrated an enterprise system into it, a huge web application for online publishing that could easily be changed from a single server to a load balanced cluster, and it works like a magic wand.
Sure, PHP has its drawbacks, but you can achieve anything you want within the limits of a normal web application.However, where Python really shines is the fact that it is universally applicable and that it can be useful to you in many ways.
I just started getting into Pyhton, and I like them both, but if I did a web app, I would always choose PHP.It’s all down to habits and best practices. Sure, most PHP code out there is terrible – but that’s because the people who write it are inexperienced hobbyists. Defining clear boundaries, best practices, and clean structures is something that can keep PHP much more structured, readable, and clearer than Python’s indent-based programming.
This discussion smells like “Why is Java a better multiplatform solution than AIR/Actionscript?”.The answer may be obvious – oh, it’s Java – but it’s not. Java is a good language, but it works terribly. The JVM is a slow death for each computer, a memory that is no longer recognizable even in the most optimized applications (NetBeans, an IDE for the development of Java applications, will consume the entire CPU and over 2 GB of RAM after a few hours – and that n while it is being used for PHP). AIR can surpass it at any time of day, and it has the same functionality. But humans are inherently resistant to AIR:
1.It’s written in Actionscript, and AS comes from Flash, right? Iiih, Flash! FALSE – Flash is fantastic when you know how to use it. The fact that most people use it to make ugly website intros is not the fault of language.
2.Nobody wants to learn a new programming language if they already know one that does the same things.
Learning AS was incredibly useful to me – even though I only did a few real applications with it – and learning PHP was just a career boost.I will also learn Python, and then on to Scala, just because I can, and just because I want to know by nature which language to apply to which problem without trying to reinvent hot water in another language.
So don’t focus on “Why is X better than Y”. Instead, you should opt for “Should I learn X first, or Y?”