DEV Community

loading...
Cover image for Do developers still use PHP?
Run [X]

Do developers still use PHP?

Nočnica Fee
Actually the pug from Dune (1984)
・1 min read

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.

Discussion (51)

Collapse
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.

Collapse
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 ☺️

Collapse
tavi profile image
Octavian Nita

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

Collapse
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 ;)

Collapse
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

Collapse
nocnica profile image
Nočnica Fee Author

I've heard good things!

Collapse
amanchourasia profile image
Aman Chourasia

You'll heard more....

Collapse
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.

Collapse
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.

Collapse
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).

Collapse
sobakus profile image
Sobakus

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.

Collapse
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.

Collapse
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 Fee Author

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
v1t0r

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 ☺️

Collapse
umangnaf profile image
umangnaf

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.

Collapse
peter279k profile image
peter279k

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 :).

Collapse
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.

Collapse
aheisleycook profile image
privatecloudev

same with java. java still powers everything even tho we her alot aobut js stuff there are probaly more php and java and cobol applications that power most needed operationa companies. if it works a company and dev will stick woth it i supported a old java applet fr colelge for years

Collapse
baohx profile image
Gordon Forsythe

One sad reason (IMO) new developers are not using PHP is because they are getting railroaded into doing JS for everything by all the silly bootcamps out there. Apparently PHP is neither cool nor hot, so obviously it's not worth learning. :sigh:

Most of those new devs have no idea how the underlying language actually works, let alone that there are other languages that are better for doing certain things.

I would love to have a bootcamp add PHP to its course to teach actual OO principles but they're more focused on spewing out garbage "full stack" devs who don't even know SQL, but expect 6 figure salaries immediately after graduating.

I personally run a PHP meetup in my area and even though the community has shrunk a bit over the last decade, the language itself has made huge progress recently, and I expect it to continue to do so for the foreseeable future.

Don't listen to the haters. Most of them either had to deal with a badly developed legacy application, or are too lazy to learn proper OOP, or the last time they actually looked at PHP was 20+ years ago. Of course, that leads me to one of the few bad things about PHP - it's incredibly easy to do things badly, and there are way too many "tutorial" articles or comments on the internet that lead developers down the wrong path for accomplishing things.

Collapse
greenroommate profile image
Haris Secic

I do now by accident. But it's a good example. Old projects in a big company started of as simple prototypes that were quickly adopted or accepted because they had a good purpose for efficiency of employees working on various things. As things move slow in big companies they were never properly adapted to production grade so it stuck since about 2015 or earlier. Now there's an effort made today to move them to other tech stack but it's incredibly hard to do so as there's too much to replace. This is why not a single technology can be replaced as easily but might be poorly moved to different platforms. Sometimes maybe even moved in quite a good way. But that all said it's mainly due to politics in the company on how much resources (as in time, money, and human) will be allocated and will it be possible to make it good. Doesn't really matter which language rather than how it was implemented in the start. My situation is that prototype that doesn't use any framework is just too hard to refactor so we're rewriting hopefully into different stack as most of us dislike PHP and dynamically typed languages. A matter of "taste" rather than tech properties

Collapse
bovermyer profile image
Ben Overmyer

Absolutely. PHP has a wide following, and continues to see energetic development. I write mostly TypeScript and Go these days, but there are still a few instances where I choose PHP over other options. Usually, that means Laravel.

Collapse
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.

Collapse
ghoshriju33 profile image
Riju Ghosh • Edited

PHP is the best choice when it comes to shared hosting. Many of our clients doesn't have the budget to purchase node hosting. Also, in my opinion maintaining a monolithic PHP codebase is far easier than decoupled codebase. For separation of concerns I prefer MVC framework most of the time. Also for office work I use mostly wordpress.

Collapse
parazitenew profile image
parazitenew

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.

Collapse
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.

Collapse
imohd23 profile image
Mohamed Latfalla

I don't but yes its still a big thing in the MENA region as I see a lot of jobs for Laravel and other PHP frameworks. The reason is a lot of businesses made their systems with PHP and especially Laravel, and they don't evaluate the switch from it. Its working fine and in comments @umangnaf mentioned, its getting better and better. So the reasons are a lot to stuck with PHP and it has its own use cases like admin dashboards, easy to made and easy to maintain plus dev time isn's that long.

Collapse
yannickdurden profile image
Yannick

In my company, there's some projects with php (5.6, no framework), called "legacy projects". New project are built in php with sf 5. For personal project, I'm using php 7.4 or 8. I'm not in love with php but for some projects it's easier to start. Sometimes with js (angular/nestjs).
It will depend of the purpose 🙂

Collapse
psagarna profile image
psagarna

If you compare any language in the market regarding web application PHP is the best. Why?
-To start development you only need XAMPP and any editor.
-If you know dev patterns you could dev your own architecture for your project otherwise you could use a framework. Even if is "server side" development code in .php its simple to reuse comparing react you should put the Html code as output of a method it is very confuse like was "Servlet" in java. Try to change something, the process is very complex thats why appears "Devops"
-Instead use npm and "10" understables files in xml for config everything, in PHP you dont have it, just dev.
-After dev, to install it? just copy into the server and works, dont need CI/CD a lot of effort with npm, move and change those 10 files.. etc.. amazing as Engineer I don't believe how we do complex things instead of simplified.
-All hosting has PHP installed as part of apache linux centos, you dont need expensive ones because need other capacity or capability like npm installed

Remember PHP is going to be the best Languague ever and in the future will rank first place.

Pablo

Collapse
puskalkhadka profile image
Puskal khadka • Edited

you can't erase php on one day. Still lots of Million dollar company use php as their major backend . Deep down we all know php is not powerful and fancy as compare to several other langugage but saying this, we also have to consider that it is improving on each update. So lots of developers are still using php and they loved it.

Collapse
davidgagne profile image
David Vincent Gagne

I've been using PHP for 20 years and still routinely begin new projects with it. (I use a dozen other languages, too. e.g. Swift, SwiftUI, HTML, JS, CSS, SQL, etc.)

Collapse
aheisleycook profile image
privatecloudev

yes i do and it powers most cms and college systems you would be suprised also nigeria likes php because you dont have download extr modules to do ohters capabilies

Collapse
aheisleycook profile image
privatecloudev

Also note PHP is most adaptable with Apache and nginx

Collapse
artemgoutsoul profile image
Artem Goutsoul

PHP is great! Fast, reliable, easy to maintain and debug. But the biggest advantage is amazing community around the interpreter itself and 3rd party libraries, frameworks and tools.

I'm using it both with existing projects and for new stuff.

Collapse
friedinand profile image
Freddy Rodriguez

Drupal 9 - Symphony - Laravel - Hibrid Apps - Decoupled Drupal 9 with Flutter, React, Vue

Collapse
almarrr profile image
Almar Groenewald

Yeah I use it, using Laravel as an api for my React frontends, but I like node.js too.

Collapse
amanchourasia profile image
Aman Chourasia

Yup!

Collapse
camargoltiago profile image
Tiago

PHP pays the bills. That's all

Collapse
nocnica profile image
Nočnica Fee Author

I hear that

Collapse
fabiorsodre profile image
Fabio Sodre

Yes. Excellent programming language. Today I work with php and julia lang.

Collapse
fchaussin profile image
François CHAUSSIN

Php have the biggest open source ecosystem for backend stuff

Collapse
hsimah profile image
hsimah

I use Hack every day at work.

Collapse
sentadoensilla profile image
sentadoensilla

Php is alive like moonra

Collapse
meem profile image
alMubarmij

Yes.

Collapse
nocnica profile image
Nočnica Fee Author

Love seeing the responses here!

Collapse
amanchourasia profile image
Aman Chourasia

You should!

Collapse
razorcell profile image
razorcell

Only legacy projects. I would not choose it for future ones. Wordpress blog maybe or magento.
I like to write less. Php syntax is much longer than JS.
The smaller ypur code the better!