If I had a dollar for every time I heard a client or someone else say “I can’t believe you use PHP, PHP is garbage”, I’d at least have enough money to get a decent lunch at Arby’s. People, especially developers, like to dump on PHP.
But we at Row and Table use PHP for nearly all of our projects and we aren’t interested in doing anything else. In fact, if you are doing a typical SAAS project in 2020, we highly recommend you use the PHP laravel stack.
So let’s explain ourselves.
Why developers love to hate on PHP:
In our experience, there are four reasons why PHP get’s lots of hate. Let’s talk about them:
1. The PHP language itself is not great.
2. PHP is seen as a beginner language.
PHP is the language behind at least 60% of the web and it’s been the dominant server side web language for a long time. Almost every web developer cut their teeth using PHP, usually making websites in WordPress. So PHP kind of has a stigma as the “kiddie pool” of web development.
3. WordPress runs on PHP and most developers have a bad opinion of WordPress.
The biggest PHP project is WordPress, which by some estimates runs 1/3 of the internet. There is a whole segment of web workers who do nothing but work on WordPress, and these guys are seen as being not real web developers by the rest of the web development community.
Let me say this – WordPress should not be the foundation of your SAAS application. You should reach for wordpress for one reason and one reason only – running a blog or magazine site. For anything else there are other tools for the job.
That being said, judging PHP by WordPress and WordPress developers isn’t fair.
4. PHP just isn’t cool.
The cool kids write Node.js applications, or Python or Go or..anything but PHP. It just doesn’t seem as hot as other platforms and languages.
This is true. But just because something is uncool, doesn’t mean that you can’t still make amazing stuff with it. Nobody sells Radial Arm Saws anymore, but I can get more done with the 1957 dewalt radial arm saw in my shop than with any of the chop saws I could buy at Home Depot.
Why you should still use PHP
1. Laravel is awesome
The truth is, we aren’t PHP fans. PHP mostly deserves the hate it’s gotten over the years. But we are huge fans of the Laravel application framework which happens to run on PHP and in our opinion has no equal among other languages.
Laravel has been around now for nearly ten years, and in that time has developed a huge cult following among developers. Most of these developers would frankly tell you they don’t love PHP, but they love Laravel and the Laravel framework and the ecosystem that has developed around it more than make it worthwhile to write in PHP.
2. The Laravel ecosystem is awesome
What is the Laravel ecosystem? Laravel is kind of unique in the world of web frameworks in that it offers more than just an application framework. They offer extremly good first party tools like:
- Laravel Forge – a tool for setting up and managing cloud servers that saves a ton of time.
- Laravel Envoyer – a tool for managing multiple PHP server deployments.
- Laravel Spark – a paid package that gives you an amazing starting place for building a SAAS. It takes care of billing, invoicing, user management, user impersonation, API authorization and much more. It can save you months of developement.
- Laravel Nova – Nova is a drop in administration panel you can use to manage your database when you don’t want to write a gui for an application. We end up using it all the time and it works great.
- Laravel Vapor – This is a one stop, serverless deployment service that scales infinitely. Basically you write the app, setup an AWS account and turn on vapor and you never have to wory about scaling.
Add to all this the fantastic documentation, podcasts, conferences, learning sites, blogs, books and more and Laravel is just about the best place to be if you are making web based software.
3. PHP is the easiest code to deploy
We deploy all of our code using Laravel Forge and Digitial Ocean servers. It’s a breeze. But even if we didn’t use these tools, PHP would still be far easier to deploy into production than apps build in any of ther coding language.
We used to build apps in Node. Setting them up for deployment could take days. We’d have to run watchers and manually configure NGINX proxies. It wasn’t fun.
But a PHP app just needs to be dropped on any server just like a website and it should work just fine.
4. Laravel developers are easy to find.
Another invaluable benefit of using Laravel/PHP is that you can always find developers to add to your team, and they can usually jump right in.
Upwork has over 600 developers tagged with Laravel IN THE US ALONE. Honestly, it’s probably a lot more than that, I got tired of clicking through the pagination at the 60th page.
There has to be thousands of freelancers worldwide who can and will work on a laravel project. So finding people is far easier (and usually cheaper) than with alternatives.
5. Well written PHP code is fast and performant.
Consider these articles:
PHP 7 is WAY faster than PYTHON, and, while it isn’t as fast as node.js code, it probably runs better in practice because of the way it handles errors. (Node apps tend to need to be completely restarted when they hit errors which slows them down a lot).
Yes, there are bad parts of PHP, but PHP also has a lot going for it that more than makes up for the bad. If you are building traditional SAAS software, or an API, the bad press shouldn’t scare you away from PHP.