PHP versus Python for Startups in a nutshell
Big sigh.

- Popularity?
According to Google, 80% of the webs are powered by PHP. So, who is more popular?
PHP 1, Python 0
- Infrastructure
PHP is highly popular, it’s incredibly easy to find a hosting that uses PHP. Some hosting services aren’t even promoting “we run PHP”, by default they run PHP (out of box experience). Instead, there is not many hosting that runs Python. Business speaking, PHP is better because it’s easy to find hosting (ergo to find a good price).
PHP 2, Python 0
- Performance
Now, PHP is fast for the web than Python. So, we could run PHP on a modest (cheap) configuration and serve more users at the same time. Again, business speaking:
PHP 3, Python 0
- Which is easy?.
Both Python and PHP are scripting language. However, PHP is aimed at web natively and without a library. PHP doesn’t need Django (or any other library), it could use a framework (there are many for PHP) but they are optional. In fact, PHP allows an out-of-box experience with web and mysql (database). How Python is easy?.
PHP 4, Python 0
- Data Science
Python is king for data science (pandas). However, if the startup is not about data science, then Python doesn’t shine at all.
PHP 4, Python 1 (for data science startups)
- Market size
The Python market is fragmented in two, Python 2 and Python 3 and they aren’t compatible. Instead, PHP is also separate on PHP 5.x and PHP 7.x but PHP is practically 100% compatible (with the exception of a few instructions). So, the whole PHP community works as one, while the community of Python is split between old vs new. Some examples:
Python 2:
print 'Hello, World!'
Python 3:
print('Hello, World!')
PHP 5.x
echo “Hello, World!”
PHP 7.x
echo “Hello, World!”
PHP 5, Python 1
- Comparison with other companies
But, but some big companies use Python….
First, big companies use a lot of languages at the same time. For example, Google, Google uses Python but its main language is not Python but C++. Also, a startup is not Google (aka, YOU ARE NOT GOOGLE) so why are we comparing a billion dollar company with a startup?.
Also, if the language is scalable, open source and such are moot, practically every language is open source and scalable
- Documentation
Now, Python “It has wonderful documentation and community support”
OH, really?, really?.
Python, convert a string in uppercase.
https://docs.python.org/3/library/stdtypes.html?highlight=lower#str.upper
3 lines, no example and no explanation and the documented is fragmented by version.
PHP, convert a variable in uppercase
PHP 6, Python 1.
- Salaries
In average, the salary of a PHP programmer is 5–10% lower than the salary of a Python Programmer.
PHP 7, Python 1.