
Python vs. PHP: Which to Hire Developers For?

Posted by Walid Abou-Halloun Date: Sep 20, 2018 12:29:19 PM
So you’re considering hiring a developer to work on your software project. You’ve narrowed the stack down to Python vs. PHP, and now you’re wondering how to proceed.
Should you hire a Python developer or a PHP developer?
Keep reading for your definitive guide to choosing between the two popular programming language.
Understanding your Motives
There isn’t a generalised answer to this question. If you search online, you’ll find a slew of pro-PHP articles, and almost the same number of pro-Python articles. People have their own personal favorite and will push for that as an answer.
So for you to decide which is best, you need to get it straight why you’re interested in hiring a developer. Here are some of the main reasons and which stack to go for:
Mobile Device Applications – Winner: Python
The two main mobile device ecosystems, Apple’s IOS and Google’s Android platforms, both have ports that can run Python or PHP. However, PHP generally will require additional drivers and software installed with the application package.
It is possible to write mobile device apps using PHP, but very few developers do it. The main use case would be for porting an existing web application to a mobile device.
Applications written in Python can be made cross-platform very easily. If you write a Python app for Android, you will only have to make superficial modifications to make it run under IOS. This makes Python the clear winner in mobile app development.
What is Python used for in mobile app development? Everything! Python is one of the top three languages (next to C+ and Java) for cross-platform work.
Education – Winner: Python
The history of the two languages has important implications for their educational use. Python is a derivative of the “ABC” language, while PHP is a derivative of C.
C is one of the most basic, and most popular language families in all of computing. Virtually every device ever built has some version of C in it, and this has been true since the 1970s.
This becomes obvious in the syntax of the languages. PHP relies on typical computer programming language idioms like curly braces “{ }”, semi-colon end lines “;”. These conventions are typical in computer programming but not in normal human-readable language.
The “control blocks” in PHP are therefore more difficult to read for a person who doesn’t have any programming experience. Contrast this to Python, which uses plain English words to handle control flow.
Another major difference in PHP vs Python is that in Python, “white space” is critically important, while in PHP, white space is totally ignored. This makes Python conditionals simply easier for the human eye to read. Compare these two blocks which do exactly the same thing:
Python
if x == 5:
Print(“It is five.”)
else:
print(“It is not five.”)
PHP
if($x==5){echo(“It is five.”);}else{echo(“It is not five.”);}
Both formats do exactly the same thing, but the Python version is easier to understand and read for a beginning programmer.
Therefore Python is a much better langue for beginners to learn. More educational programs use Python to teach students than do PHP. Python is the preferred language to teach children as young as five how to program software.
Web Development – Winner: PHP
PHP was created to handle web development. It is used to power almost 90% of all websites on the internet! There is no question that PHP is a better language to use to create web pages.
If you read articles on the web that ask “why is PHP so popular” you may notice that there is a lot of debate that focuses on various aspects of the languages. I offer you another question to ask yourself:
“Why do Chinese people speak Chinese?” Well, because they live in China! There is a real value in speaking the same language everybody else speaks so that you can communicate with more people doing the same things that you are doing.
When in Rome, do as the Romans do! The same can be said of any environment in computing. If everybody else is doing it one way, it’s probably a good idea for you to adopt the same strategy. There is Python web development, but it’s fewer than 1% of websites. The vast majority of website use PHP.
This is reasoning enough for you to choose PHP for web development. If you have a web app written in Python, that will probably work just fine. But what happens when a few years down the road you want to extend the system or make improvements?
CMS Development – Winner: PHP
A content management system is a software platform that organises and publishes data. If a word processor creates documents, then a database handles information a CMS sorts the information and puts it on the web.
There are many different types of content management systems. Some are designed for specific types of information or publish them in specific ways.
YouTube.com, for instance, is a platform owned by the company Alphabet (Google). Most of the backend organisational software that runs youtube.com is written in Python. This was a corporate decision made for their very specific use case, but in a real way, YouTube is a giant CMS.
However, the YouTube platform is an exception to the rule. Most CMS systems are written in PHP. Magento and Shopify are PHP written platforms. Django is a CMS that uses Python, but it’s hard to think of any other popular systems.
WordPress
WordPress is the 700-pound gorilla of content management systems. The world’s #1 platform for almost anything, it has up to 50% of new pages published on the internet created through it.
WordPress itself is written in PHP. It is a fork of a system called CafePress. Since 2002, tens of thousands of software developers have contributed to the WordPress ecosystem.
Also, it is an “open source”. That is, the source code that runs the platform is published on the internet, and is open for anyone to extend or modify in any way they want. Just as WordPress itself is a fork of an earlier software platform, you could fork it into another platform any time you want.
Instead of forking the entire core of WordPress, developers can take advantage of its open source extension system called “plugins” and “themes”.
WordPress allows anyone to add custom plugins to the base software, to make it do basically anything you want to do with it.
This is where most “web development” is happening today in the world. More people work in WordPress than on any other platform that has ever existed. It’s the largest community of software developers in the world.
If you want to develop and work in the open source WordPress ecosystem, PHP is the way to go, as it uses PHP and Javascript as well. The jQuery library is distributed with every WordPress install.
You could easily deploy a Python script with WordPress if you wanted to. There is nothing stopping it from making any kind of system call, and many plugins access binaries and executables that aren’t strictly written in PHP.
Hiring PHP programmers
WordPress/PHP programmers are a special group of software devs. There are simply more human beings who can program in PHP than in any other computer languages. There are more devs who have experience in the WordPress ecosystem than any other.
You can hire remote outsourcers who know WordPress on platforms like Upwork or Freelancer. If you post your email address on Upwork looking for a Jr. WordPress Dev, you will not be able to respond to all the applicants without having to hire other people to process the applications—there will be so many.
The good news about PHP development is that there are thousands of WordPress devs. The bad news is that their skill level varies as much as anything else among huge groups of people. There are super highly skilled WordPress developers, and there are a lot of people who can hardly code.
Find at least one experienced technical lead when you are hiring WordPress or PHP outsourcers. You need to be able to sort the wheat from the chaff.
Hiring Python Developers
In the Python ecosystem, this isn’t such a problem. Python devs will generally be slightly more experienced, and professional than WordPress/PHP developers. This is because they are more likely to have had formal training than to have just “picked it up” like a lot of PHP people.
This isn’t to say that they are superior to PHP developers as a class. There is a wider variety of skill level in the PHP community than there is among the Pythonists.
Final Verdict: Python vs. PHP
There isn’t one clear winner when it comes to Python vss PHP. But there is a right answer for you, personally though.
Examine the reasons you’re thinking about hiring a developer and work your way into a solution from there.
If you’re having a debate about which particular software stack to use, you should consider hiring an experienced development consultant to help you out.
Check out our blog for more great ideas on how to take your IT project to the next level!