Let's start with PHP:
- Ideal for standard web development
- Easy integration with MySQL
- $_GET and $_POST built into the language
- C-Esque syntax
Primarily used on an Apache server (Routinely, you will hear of a full LAMP stack: Linux OS, Apache server, MySQL database, and PHP)
PHP, for the most part, is meant to be used for rapid development of fundamental to moderately advanced websites. It doesn't lend itself to more complex tasks, such as advanced mathematics, multiprocessing, and almost anything else outside of a real web-developmental environment. It integrates with MySQL for database work, and for the most part, requires little to no setup or prior knowledge to use. PHP is best for quickly building a website that needs to be functional.
Python:
- A general purpose language
- As noted previously, has extensive libraries
- Requires a framework to be implemented when developing websites
- The syntax makes heavy use of whitespace, unlike C/C++, PHP, etc. which use { } to enclose blocks of code.
- Depending on the framework, your server can vary.
Python is far more potent than PHP in pretty much every aspect. PHP will only "beat" Python in that even the most inexperienced of "programmers" can write a website with essentially no prior setup or knowledge. Python requires a framework for web-development – it must have some way to communicate with servers, deal with HTTP protocol, etc. Python makes use of libraries which are invoked by the "import..." These libraries often allow for advanced features and programs to be written, ones which PHP would be incapable of. Python, although very simple, can be used powerfully for many, many applications.
And please note, Python should never be placed in the same league as PHP – they are two completely different programming languages.