DEV Community

Cover image for Do developers still use PHP?
Nočnica Mellifera for Run [X]

Posted on

Do developers still use PHP?

Cover image by Camilo Sanches, CC BY-3.0, via Wikimedia Commons

I was working on a meetup for serverless developers recently and an attendee mentioned the Symfony PHP framework, and how there was actually a runtime to run PHP serverlessly on AWS!

Pretty impressive stuff, but I'm curious to hear from the up-and-coming readers of DEV: are you still using PHP? If so, what do you use it for?

Are you using it because you're stuck with the framework at your place of work, or are there things you love about it?

note: My DEV articles are not places to make fun of other developer's skills. Any dismissive or derogatory comments will be deleted and the posting account reported.

Top comments (50)

hasnaindev profile image
Muhammad Hasnain

PHP powers 80% of the websites on the internet. Of course, there are tons of PHP developers, including me. It is a beautiful language IMO, has its quirks but it is good. There are literally million dollar businesses running using PHP and I suppose that's why I'm sticking to it.

giuliamalaroda profile image
Giulia Malaroda

I'm a front-end web dev in a digital agency and we were thinking to switch to Javascript both for the front and the back end. Then taught about it and decided to keep PHP for the backend and in case use Javascript (react, angular, vue) only for the frontend. So yes, PHP is still a big player for us ☺️

tavi profile image
Octavian Nita

Just curious -- what made you guys stick with PHP on the backend?

mguinea profile image
Marc Guinea

There are several factors:

  • Lot of jobs requires PHP
  • Has a great community and ecosystem
  • Even with its lacks... it works!
  • Comfort zone
  • Language is not everything, in my case, I prefer paying attention to best practices / architectural patterns, devops... and improve it than learning a new language.

Just my point of view ;)

juststevemcd profile image
Steve McDougall

I've been using PHP for perhaps the past 12 years or so? To start with I used it out of need, agencies were using PHP systems (Wordpress, Joomla, Magento) and then moved to companies that has pre existing products built in a variety of frameworks.

But after spending the last 12 years as a PHP developer, learning other languages along the way such as python, objective C, swift, Ruby, GoLang etc - I still reach for PHP when I'm building for the web. Why? Because it works, it's fast to do things in, and it's a lot better than people remember. We aren't in PHP 4 or 5 days anymore, we have a mature OOP approach and a fantastic ecosystem for packages and distribution, PHP 8 alone introduced my absolutely incredible features and speed improvements.

With all of the above being said, when it comes to serverless tech, where I am paying per 100millisecinds a program is running - I would lean away from PHP. It's great don't get me wrong, but it's not as fast as something like GoLang. I've built massive warehouse and distribution systems in serverless Go Lang and while it takes longer it's worth the time investment. If I'd built these systems in serverless PHP, the billing would escalate, as PHP takes longer, q simple fact. This is coming from a PHP advocate.

PHP does not belong in a serverless environment in my eyes, unless we are talking about a dockerized environment that runs when required such as Google Cloud Run - but lambda, no.

PHP is web, it's great at web, it's reliable and works well at web, it's not optimized for anything other than web interactions (apart from handy small CLI apps).

Just because you can do something doesn't mean you should do it. You choose the language that works for you, and works for your requirements, if that is PHP great if it isn't PHP that's fine also.

iambherulal profile image
Bheru lal Gameti

My first programming language is PHP. The Learning process is amazing and easy to learn currently I'm working on Laravel framework. I'm absolutely loved it

nocnica profile image
Nočnica Mellifera

I've heard good things!

amanchourasia profile image
Aman Chourasia

You'll heard more....

mandaputtra profile image
Manda Putra

Yes mate! Many ~ administration panel, backend services and stuff. Although I prefer another lang now, but PHP are okay though. With cloud nowadays you can achieve scalability with PHP too!!

I really recommend PHP to beginners, it is easy to get job with PHP than golang or rust.

yoursunny profile image
Junxiao Shi

I still reach for PHP when I don't want to give another 1GB+ for node_modules.
PHP is good at processing HTML and XML: the SimpleXML module is powerful.

If I want non-HTTP application, it's either Node.js (versatile) or Go (fast).

juststevemcd profile image
Steve McDougall

If you used a process manager then it would have to be running in the background to speed up the bootloading time, which would make it not serverless.

Don't get me wrong, I am a huge advocate for PHP, but I'm also a huge advocate for using the right tool for the job.

The main problem with using roadrunner like this is that you loose the point of serverless, however what it does give you is a fantastic way to add the next level of performance on a PHP server.

There are situations where serverless makes a lot of sense, but not all problems can be solved with serverless. I prefer to take the approach of progressive enhancement with serverless, and it's worked well for me in the past.

Thread Thread
nocnica profile image
Nočnica Mellifera

1) thank you for having such a respectful conversation in the comments!

2) i think on the face of it, yeah, Serverless isn't a perfect home for php since it's explicit purpose is to construct full web responses.

But there are situations where it will make sense for your team to use a Serverless platform for PHP. the users of Symfony Serverless *love" it and clearly paying for loading/startup isn't significant enough to sour them.

If your team has high Serverless expertise and a particular task runs efficiently on a Serverless platform, it'll make more sense to use it than making your team learn Go.

Thread Thread
juststevemcd profile image
Steve McDougall

I completely agree, the main driver for a lot of the decisions in a team is a split of cost/effectiveness against team skill/knowledge/expertise. You need to make sure most of all that what your building is the best you can do, even if it isn't the perfect way, it's better than using tech you don't know in a language you have a basic understanding of.

RE: respectful conversation: no need to thank me, it's what we should all be trying to do! Yes we all see a long of comments and conversations saying PHP is dead or isn't very good etc etc; but instead of jumping the gun and going on the defensive, it's easier and better to try to educate people on your experience with X language or framework. Also, respect costs nothing

Thread Thread
vitorspencer profile image

Thank you so much for your posts here Steve! You mentioned several topics which I have no knowledge about yet, and described them honestly, openly and respectfully (something which we need more and more nowadays).
Truly appreciate your comments.

Thread Thread
juststevemcd profile image
Steve McDougall

You're more than welcome, please feel free to reach out if you need advice on any of the topics I've mentioned ☺️

keralpatel profile image
Keral. Patel.

Even after using it for 20 years I still use it on day to day basis.

Reason being the same that everything that was coded in PHP has to be maintained and managed in PHP.

I still create new things in PHP and that is because it feels familiar and I don't have to change mental gears. Ultimately in most of the cases what matters is the HTML output of the project. If that is covered with ease of management and rapid development speed (My personal rapid development speed, due to not changing mental gears) then why bother with something else.

umangnaf profile image

Yeah, each version of PHP is getting better and better and there was no reason for us to really switch to anything else at that point of time.

sobakus profile image

I work in a big company and PHP is our main language by far, with a bit of Python for data-heavy backend processes a some Vue for frontend.

PHP is so easy to setup and deploy, lightweight (unless you use laravel or something like that), flexible and so dead easy to learn and debug that I haven't found yet any really compelling reason to switch to something else.

With PHP 8.1 the language will become self serving with parallelization, like Node, albeit you can do that with Swoole already.

For us it works perfectly fine for our heavy-duty mobile API.

ket_c profile image
Kwaku Amoh-Aboagye

PHP is straight forward, good fit and easy to start for web applications. It's works well too.

Web applications still dominating, so I wouldn't have any reason to totally ditch PHP.

Another point is that it keeps getting better.
So just like any customer, if your service provider keeps improving upon their services, you'll definitely like to stick around.

peter279k profile image

I still use PHP to develop my side projects and tiny services.

For example, this website is developed by PHP.

The function as service is also attracted to me and I will use PHP to develop that soon :).

moopet profile image
Ben Sinclair

Yes. The last two agencies I worked for have exclusively used PHP for back-end tasks, and as middleware or data stores for React sites.

It's widely loved by the people who love it.

I've been a PHP developer now for about 6 years, with a sprinkling of JS, and I don't think it's a good language, but I do appreciate that it's getting better. Frameworks like Synfomy (which is really the tech behind most of these other frameworks you see) go a long way to making it more robust.

It's perfectly capable of keeping up or out-performing other languages for most needs and there are a zillion programmers out there who know it already.

christoslitras profile image
Christos Litras • Edited

PHP is more than still alive, it's getting better and better. I'm a fullstack developer and I have used many things for backend, like, ASP.NET, NodeJS, custom C made services, serverless like AWS, Firebase etc. PHP combined with frameworks such as Laravel and Symphony is breeze to work with and very efficient.

With PHP 8.1 we'll get such a set of new wonderfull features and performance and I really can't wait until it's release date in Novermber! PHP has a very strong development comunity and gets new features and improvements on a schedule.

So yes, PHP usage may gets declined, but that's normal for a 26 years old language that has had such a bad repuation in the past. But today PHP is a modern and fast language and it has a huge libraries/packages repository Packagist and a great ecosystem with frameworks such as Laravel and Symphony.

I'm not surpriced any more by developers asking such things like "Do developers still use PHP?" because there are the hype kids that they learn something and how to use it and then they like to full around people that don't follow their hyped choices. Yes, there are still many PHP developers as there are still many Visual Basic developers as there are still many Fortran developers and noone knows how a language will evolve and end up; take for example Python; Python was just a niche language used in scripts and in some applications (like Blender 3D); then AI researchers and then Google picked it up to build AI tools and libraries like Tensorflow and then the language got so big hyped that it became a top language.

parazitenew profile image

I'm still using PHP, it's the first back end language I learned. It has more powerful functions than JavaScript, especially when manipulating dates. Nodejs is good to get real time data. I tried it when I had to use web socket for the mobile app. I think I will go with PHP for databases requests and manipulations, and use nodejs to get notifications and realtime data from server like for admin dashboards, to update UI on react apps. We can use both at the same time so why not enjoy.