Skip to content
loading...
Cover image for Is PHP Dying?

Is PHP Dying?

mayankjoshi profile image mayank joshi twitter logo github logo Updated on ・1 min read

Little curious (11 Part Series)

1) How does dev.to choose which post should be on the top? 2) Is PHP Dying? 3 ... 9 3) Have you ever used COBOL? 4) What is a project, you are really proud of? 5) If you were a recruiter, what would be your recruiting criteria? 6) What are the weird things people ask you, when they comes to know you are a developer? 7) What is your favourite operating system? 8) What is the best Node.js template engine? 9) A feature upgrade for the dev platform 💡 10) What rest API authentication method do you prefer? 11) What is the new tech stack you learned during Quarantine?

PHP has been one of the most popular languages for web development. But now with lots of better programming language in the market, the PHP seems kind of lost, except for WordPress and MediaWiki

So, I want to ask three questions:

  1. Do you still use PHP?
  2. Will you still recommend someone to learn PHP?
  3. What according to you is the future of PHP?

Do check out my recent post on how to design a Url Shortener

twitter logo DISCUSS (63)
Discussion
markdown guide
 

PHP is not lost at all, there are plenty of really good frameworks to use: Laravel, Symfony, Phalcon

  1. Absolutely!
  2. Yes, it's a great way to quickly set up applications and you can scale it really well
  3. PHP will stick around and get improved more over time. It's fast and gets great features for every release. It'll always be used for websites or application servers.
 

But now a days all new companies are using node, react, ruby etc etc and old companies are migrating from PHP to other languages.

Even the number of internships on PHP has decreased and even the news is that the WordPress is migrating from PHP to node

 

We still use PHP (Laravel) for client projects, PHP is absolutely not dead and there is still a huge community behind it. We have made more than 100 PHP projects in a couple of years, from smaller web applications to bigger ones that gets thousands of users a day.

One of our clients that I work a lot with has had ruby on rails projects but now for newer projects they prefer php.

This does means that PHP is still around a lot.

 

Show me the numbers. Most (new) businesses I've interacted with use PHP in production. Companies don't simply migrate or rewrite their apps. Rewrites take long and have a very high likelihood they go wrong.

WordPress isn't and hasn't moved to Nodejs. All that's happened is that they've written the front-end in React and that pulls data from a PHP server. The front-end assets are compiled using Nodejs. They're still very much PHP.

 

There are many PHP frameworks because the cambrian explosion era for frameworks occurred during the PHP era.

 

That does not take away that the frameworks I mentioned, plus a few others, are very solid. They allow you to write well-tested, fast, and stable applications.

 

If by dying you mean losing momentum and popularity, then it is dying.
If you mean, if PHP is still alive, then it is.
Google trends may help you understand the latest development in PHP.
The steep decline speaks more than words.
Anecdotical experience is not to be trusted.
Is there any chance to revive PHP? Thankfully not.

trends.google.com/trends/explore?d...

 

It will be good to look at trends in comparison with other languages.
trends.google.com/trends/explore?d...
The Javascript was supposed to grow due to the monopoly in the frontend and the development of nodejs in the backend, but it has the same trends as PHP

Take a look at the regions for the popularity of queries, in the USA or Canada PHP have weak positions, in the rest of the world, positions are very strong. Other languages ​​became strong competitors for php, and became an incentive for the development of php itself.

 
 

Yes, you are correct PHP is losing its momentum and popularity.

 

The same question was first ask 10 years ago. I expect it to come up again in a few years and a big amount of the web will still run on PHPs shoulders.
trends.builtwith.com/websitelist/PHP

 
 
  1. Yes, I use it daily in enterprise code;
  2. Yes, absolutely. It is still the most used backend language for web development ;
  3. PHP is going to stick around. Of course it's going to share the market more and more with newer languages, but it definitely passed the test of time and it's constantly improved upon.

Here's a few reasons why PHP is here to stay:

  • It's an Object-oriented language and you can pretty much do anything you could do in Java, C#, C++, NodeJS, etc. Of course the syntax is sometimes different, but it's nothing you can't wrap your head around;
  • PHP is really good at optimizing even bad code;
  • According to W3Techs' survey, it is used in 78.7% of all websites where they know the backend programming language of: w3techs.com/technologies/details/p... ;
  • Even if you don't plan to code in PHP, it is still really useful to know one of the most widely used technologies in web development.
 

PHP has a very large inertia and will stick around for a long time still. Heck, even Cobol and Fortran are still used today.

But hey, it's not like Java is any different now. Thanks Oracle 🤦‍♂️

Anyway, PHP will inevitably decline over time While it has done good points, the language and the standard library are a mess. Its performance is good for most of the tasks, especially against Ruby or Python, it gets trounced by more modern solutions based on JavaScript, Go or Rust, or even Java.

As for me:

  1. It's been a couple of years since last time I've coded in PHP and I don't miss it.
  2. Only if they'll have to deal with some classic environments, e.g. WordPress, Joomla, etc.
  3. It will be used less and less as it won't be adopted for new stacks.

But my final advice is: don't you ever, ever make fun of someone who's making a living with PHP. They deserves respect like any hard worker.

 

It's not "dying" -- except in the way we all are -- but it is changing. The days of PHP as a collection files that correspond to specific URLs are long gone. The PHP all-in-one platforms (content management, e-commerce systems, CRMs, etc.) are still out there, but mostly chugging along in maintenance mode, some creakier than others. Most of these open source projects would welcome new users and developers, but the systems are older and require an investment in learning the programming patterns in use by those teams. Installing and maintaining these platforms also requires a bunch of unix sys-admin skills that seem like a dying art. This creates a high barrier to entry and ownership.

You don't see or hear a lot about new all-in-one systems being built as redistributable PHP code -- most people who want to build that sort of software seem to do it as SaaS applications/platforms these days.

Installing PHP -- like most languages -- has become a bit of a nightmare. Tools like apt, yum, or brew often make all-in-one install a breeze -- until something doesn't work. Docker helps here some, but PHP's a system that's works the file system hard, which can make using Docker for anything real more trouble than its worth.

Where PHP's still going strong is the core project and the generic-programming-framework communities. Projects like Symfony and Laravel are thriving -- even older frameworks like CakePHP and CodeIgniter continue to be worked on and used. The frameworks and libraries also work together better than they ever have thanks to PHP's package management system, composer. Composer lets you get code onto your computer easily, and provides lightweight bootstrapping that helps enforce a few key PHP standards (mainly around autoloading of classes)

The core language is still run by a loose group of insiders, but those insiders have gutted PHP's internals and created a language whose performance is equal to, and often excedes its peers in the "we came from C" language families (python, ruby, perl, etc.), and one where it's much easier to develop new language features and syntax. The PHP 7.x line has seen PHP adopt features, syntax, and type safety seen in OOP languages like Java and C#.

There's also a lot of interesting work being done by third parties extending the PHP runtime to include single-and-multi-threaded async programming similar to what you'd find in NodeJS or Python's Twisted (Swoole and the confusingly named ReactPHP come to mind). The talk is PHP 8 will comes with a JIT (just in time compiler) to help with performance for these workflows.

So PHP is still an active language and platform with a lot going for it.

What's seems "dying and close to death" is a certain sort of frontier web development where PHP happened to thrive. You don't run your own CMS these days -- you pick something like Square Space or Wix. If you need more advanced features there are other services that can make this super easy for you. The fashion in user interface programming is to use javascript and abstract your backend into generic service calls. As web development professionalizes and corporatizes there's less room for languages like PHP, ruby, python, perl, etc. All of these languages continue to be used -- but they're less and less the air that a generic web developer breaths.

 

I think that heavily depends in each local market; what I've seen PHP is still being used but most of the times are crappy old systems that have to be maintained; PHP devs are kinda disposable, there are a lot of them, so usually PHP code is a patched mess, result of too many cooks that didn't planned to work on it for long. A lot of Wordpress patch-ups and fixtures. PHP usually is used because is cheap to find workforce and that because is easy and fast to get results, when you chose for those reasons, quality is usually not a priority, my experience with PHP devs is that usually just want to finish as fast as possible to get to the next thing, maintainability is no concern; good practices? HA. Because of the jobs are not long term, there are also a perverse incentive to make unmaintainable code and undocumented code, you are harder to replace that way. And because there are so many devs is a meat grinder. Python and Ruby are also fast to learn and code, but they make much harder to write a mess. And there are less devs, I've seen that there are much better jobs, the devs are more appreciated. I've heard that new PHP is much better than the old one, but most PHP code is old one; usually PHP is the choice because is cheaper to get devs, what is even cheaper? hiring less and keep running old code as long as possible, and a bit longer.

  1. Hell no, I toyed with it when it was bad, when it got good I was already invested in Python, no reason to move to PHP.

  2. Not really, unless necessary, if you are looking in a region where looks like there are good jobs with it, specially new projects with it, go for it. If it to maintain old code? run to the hills. To start from zero? nah, pick Python and/or JS; if is a project on your own maybe take a look at Rust or Golang. To me Python has the same advantages of PHP, but is much more versatile, there are tools for everything, if you can think of, there is a Python library for that, if you can't think in something, there is a library for that too.

  3. It will keep going for long time, the existing codebase is huge and has too many devs to die anytime soon. Maybe if enough of the old crappy code gets replaced before everyone jump ship, it may get a second wind. And maybe the new PHP attracts better programmers, nowadays you find a lot of PHP devs, but is really hard to find good ones.

 
  1. No, I don't use PHP anymore. But I would if it was because of my work. I really love Laravel, which I used for two years. I use Symfony for a school project for a real client and it is nowhere close to Laravel. Symfony's documentation tend to be deprecated really fast, and they release features faster than the documentation. As you may understand, documentation is a key-feature for me.

  2. It depends on the target. For beginners starting to learn client technologies like HTML, CSS & JavaScript, I would not recommend PHP but rather Node.js since it is JavaScript-based, it would take much less time understanding the platform and getting ready. Plus, it does not require any other technologies to create its first web server, compared to PHP which (if we forget about php -S) often requires an Apache server to be ready to serve its first page. And most people don't know Apache so they start using embedded solutions like XAMPP or LAMP or MAMP and start learning about the joy of having installation issues. Ah the days spent to solve architectural problems...

  3. Most people use PHP for Web development. For my part, I have created some personal utilities like a custom system bar for the I3 window manager on GNU/Linux which was a PHP script. And I absolutely loved the experience that PHP gave me. The object-oriented paradigm is really well integrated into this language, which JavaScript is really bad at. And Composer is the best dependencies manager, all languages combined, no discussions. I would love to see more PHP-based GNU/Linux programs because it is really powerful and easy to construct complex applications with it, while JavaScript (nude), even if efforts have been made, is pretty hard to scale with.

 

Hello,
IMO Php is not dying. PHP contribution in the current days is still huge.
I'm still using PHP to build API nodes using Laravel and CodeIgniter with Propel as ORM. At the same time what was a while ago 100% Server-Side MVC now is half or more moved on the client-side under React, Vue and & the gang.
My humble answers to your pool:
1 - Yes
2 - No
3 - Slowly going down - quite difficult to predict the drop rate. Laravel did a nice move to link their stuff to a super trendy technology like Vue. Who knows what happens tomorrow.
Cheers!

 

I agree the PHP trend is slowly going down, except for WordPress, I think PHP is still there, one reason is WordPress.

 

Hello,
Agree, WP is another super important PHP pillar but also has some strong competitors. More information is now consumed using headless backends, and this pattern hits WP hard. We will see where PHP will be in the next few years. Personally, I'll keep my eyes on this technology. PHP helped me a lot in the past to build stuff.

Cheers guys!

 

I still use PHP at work to support a system built in Codeigniter. We're planning to rebuild the system, not just because we don't like PHP, but also because the system wasn't built with the best infrastructure or practices in mind.

I don't think I would recommend anyone to learn PHP because I myself haven't learned PHP. I came from a Python background and learned PHP on the job. Any backend language would suffice, in my opinion.

 

That's right, mostly if you are clear with the concepts of programming then you won't struggle with learning a new language.

By recommending some to learn PHP, all I meant was if someone just entered into the field of programming would it be a great idea to ask him to start with PHP.

I guess no.

 
  1. Yes, sadly.
  2. Maybe only some PHP platforms, not all of it.
  3. I don't know. I hope the most used web platform in the world is not Drupal/Wordpress anymore.

PHP is not dying, but it is cursed because of the CMS(s). Even though I love Laravel, I want to leave PHP soon.

 
  1. Love Php , i still use.
  2. I'll recommend.
  3. Php now is improving a lot and introducing many functions like other popular languages.

If other languages are better than php then they should have stoped it's development but they didn't. php is 7.4 now. & laravel is 7.
if that was the thing laravel would have been shutdown by now.

the reason why this comes in mind coz developers are showing more interest in JavaScript , node . We see it everywhere & we feels like "why no one is talking about php".. truth is php is foundation of internet actually .

that's my opinion though.

 


the reason why this comes in mind coz developers are showing more interest in JavaScript, node

Even I think this is the main reason behind, PHP losing its popularity.

 
  1. I do.
  2. I do.
  3. A technology that will probably keep the good ratio of required knowledge to use to achievable quality of code. It is far from stagnant.

Overall, with Symfony, an actively developed framework that has reliability in mind, you can write good code with PHP. The language itself took on a more rapid development approach, including more suggestions from the community.

 

People that have learned to be productive with php will continue to offer it to their customers. Most customers don't really care what you build their website or web app on. Apart from the very popular Symfony, Laravel etc there is the popular WordPress and Drupal CMSes which depend on php and they don't seem to have lost significant users/customers either. Of course the competition is good and forces all those frameworks/CMSes to adapt to better and newer practices and for php itself to improve over time.

All in all I don't see php going away any time soon. php based project that are adapting to the challenges of modern web development will stick around. We have to also consider that most of existing projects/websites depend on php and that number is huge as for many years php was probably without much competition the number 1 language to use for web projects.. There is of course new projects based in php build every year.

I am not sure I would recommend anyone starting with php when currently there is more jobs with js around but is a language that can get the job done and can't be overlooked.

 

Even I would recommend someone to start with Js only.

 

octoverse.github.com/ - php is on the fourth place among the most popular languages on github. I don't think it is going anywhere. It is a great and practical tool and we all love to hate it ;)

Cheers!

 
 
  1. Sadly, no
  2. Depends, but rather not.
  3. No idea - before 7.0 I thought that it was already dead. Now, I think it has potential.

Word of comment: I have switched jobs recently, and as such, I am forced to program in Ruby on Rails and Python (Flask). This fact made me realize, how much I miss PHP and Symfony.

 

1: Yes
2: Yes
3: PHP will be there as it's easier to deploy whether it's a cheap shared hosting or a dedicated server in the cloud

 
  1. I am prepping my PHP skills once again, in anticipation of doing Wordpress plugin code
  2. I think PHP is worth learning. It's one of the probably most "voluminous" code out there, in real web apps. If you want to get around to learning a backend language that certainly has a big audience, mature tools, and so on, PHP is a sure bet.
  3. I don't see any threats to PHP existence.
 

This is the exact same answer as you could give for Ruby.

No, it's not dying. Still a lot of shops are using it for maintained or legacy applications. It's just not as popular for greenfield projects.

The difference is that PHP I believe is a little faster than most of the popular backend languages that have dynamic typing.

 

PHP is said to be dying for a lot of years, and here it is. With a big improvement in 7.0 and 7.1, and with interesting additions in >=7.2. And if it's not enough, I see:

  • A lot of big projects are built in PHP, like WordPress, Magento, Drupal, etc.
  • There are a lot of people following Symfony and Laravel on social media, conferences, and I see a lot of job offers asking for experience in that frameworks.
  • If you want to develop a small side project, or a small and simple website with some backend, the most affordable way to host it is with a simple hosting, that usually only run PHP in the backend

In my company we still work with PHP, and new projects are in PHP too because it's more than capable of doing the work. Maybe there are a lot of new languages with a lot of good stuff, but if the project will be more or less at the same good response as with PHP, why change it?

 

Is PHP Dying?

I think I saw this question the first time around 2005ish. Needless to say, I do expect to see this question for the next 10 years as well...

In all seriousness: I don't know what you consider "better programming languages". PHP fulfils a need and serves that need well. You can evaluate what technology better fits certain situations, but it never makes sense to speak about a "better language" in general. So whatever languages you were thinking about when referring to "better languages": They might be the better choice in some scenarios, but not in others.

So to answer your questions:

  1. Yes. And even one of my favorite languages to this day.
  2. Absolutely, assuming your goals include backend development.
  3. I am not a prophet, but I don't see PHP going away anytime soon.
 
  1. Absolutely still do use PHP; my company uses it (with a bit of Perl and Java) to serve thousands of authentication and authorization requests per second.

  2. I do recommend that someone learn PHP if it is a good tool for the job at hand. There's plenty of great frameworks and community support. Most of the complaints I see about PHP were valid in the 4.x and 5.x versions, but are no longer problems in the 7.x versions - which we have had for many years now.

  3. Cleaner, faster, and more intuitive. It's an excellent language for writing services and developing complex web applications, and releases continue to improve the language in meaningful ways. I don't see it disappearing any time soon.

It has been supplanted somewhat by all the Node/React projects, but that's the way things go. Node has its place for smaller, lightweight front-end projects, but for anything substantial, I'd feel far more comfortable with what PHP has to offer.

I've also seen Go take a stab at the lightweight service side of things where PHP tends to live, and it seems to be quite successful. Java is great for complex (or simple) services. Both handles concurrency quite well, something that Node and PHP don't do nearly as gracefully, but PHP can still make it work.

PHP is a good general purpose web/service language (and does well on the CLI too, though for bulk text processing, Perl is still king (as much as it pains me to say that)). It may not be the very best in any particular category, but it is good in all of them, and that makes it a viable language going forward.

 

PHP is not dying, in fact IMO it is more alive than ever, and for backend web development it is a better option than any other language

 

I don't like php, but it's not dead at all, the new versions published and the ones that are coming make the language so much better that it should to be.

 
  1. Yes
  2. Yes, but not as a first language, Python and JS are way better.
  3. It will be still around but not with a large amount of marketshare anymore, the back-end ecosystem will be distributed and diluted by more and more options, then PHP needs to still continually improving, including community provided solutions, to be an option on companies stacks.
 
  1. Yes, I stilll use PHP
  2. Yes, I would recommend someone to learn PHP
  3. For me, the future of PHP is its framework ecosystem (they make the language to be adopted), so PHP is allowing these frameworks to add more features in a safer and easier way (short arrow functions, typed properties, in-memory file preloading, ...). People do not produce large scale projects on pure PHP, or these people are martians (and I met 2 of them out of a huge majority since I started coding, both of them moved to Laravel).
 
  1. As long as WordPress uses PHP I will use PHP. It is the largest used CMS in the industry and not knowing how to extend that platform will hurt you down the road in your career at some point.

  2. Absolutely! If you're working with the web you will encounter a LAMP stack. I wouldn't specialize in it by any means but it's not going away any time soon. Besides you'll grow your ability as a programmer by having experience in something that is widely adopted and has been for the last 20 years.

  3. Programming languages are just tools. Just because someone comes out with a new screwdriver that changes heads so you only need one screwdriver(MEAN stack), doesn't mean I'm getting rid of my entire set of standard screwdrivers(LAMP stack). The best programming language is the one you know. It's easy to get caught up in the flavor of the month. However, rebuilding technology in a new language is both time consuming and extremely expensive. These types of decisions tend to be made by financially minded people. When you consider that, it becomes clear that PHP is going to be around for a very long time. Don't take my word for it though, in Stack Overflow's 2019 survey PHP made up a whopping 25.8% among professional developers. Which means that a large chunk of developers who get paid to write code are still using PHP.

 
  1. I haven't used PHP in nearly 2 years, with a total of about 6 years of PHP experience, with a focus on custom WordPress themes and plugins.
  2. I would recommend someone learn PHP as an introductory language, if they've never touched a backend language before. The amount of work to get up and running with a PHP server is similar to that of Python or Node.js. The low barrier to entry can be very useful for ramping up knowledge quickly.
  3. Due to how old and widespread PHP is, much like Java applets, it's not going anywhere soon. It isn't particularly riveting work to support legacy systems with potentially outdated and broken versions of web languages. So until those legacy systems get completely re-written with a new stack, they'll keep trucking along. PHP has a niche market with WordPress, Drupal, and similar MVC blog frameworks, because they're popular and already have a large community surrounding them. The problems they solve have been fixed for a long time, so there's no reason to re-invent the wheel.

I stopped working with PHP and WordPress, because the work I was doing wasn't fulfilling. I didn't enjoy fighting with the sometimes contradictory standards set by the PHP maintainers, but that doesn't mean that the language didn't work. I just lost interest in that niche market. When I tapped out i'm sure thousands more jumped in, so have no fear, PHP is here and here to stay.

 

People have been saying that PHP is dead/dying since the latter part of the 1990s.

Java moving to the web was going to kill PHP, then it was .Net, and then Ruby, and now the JS Frameworks or Python will "kill PHP" - and yet it persists.

People will always chase the hotness, that's nothing new - but, ideally, you pick the best toolchain for the job, not the hotness - and sometimes that is PHP and sometimes it's not.

Don't chase tools, they always change - always keep an open mind - use the best tool for the job.

 

And you answer the questions:

1) Yes, when it's the best tool for the job.
2) Yes, I think you should learn as much as time and energy allows
3) It will keep on keeping on - it's weathered a lot and likely will continue to do so

 

No, not in the slightest. PHP isn’t going anywhere.

 

Hei!
I've been using pho for 5 years on all my web projects. Due Hackathon events I saw more and more programmers move to Node.js or python. After some research I realized that I have to do this change. More and more companies moving to those techs.

 

These "PHP is dying" posts never cease to amaze me. They come every now and then, and PHP just comes back stronger. Pre-PHP7, yeah it was "cool" to hate on it but these days, you'll be hard-pressed to find a strong argument why it might die. PHP development is so strong, PHP 8 is coming.

There are only 2 dominant languages in the web: JS and PHP. Both with their own share of criticisms. They will only die if the web dies. When it doubt, bet on JS and yes, PHP.

 

1) Yes!
2) Sure!
3) It is difficult to say, but the community is very active and the language is always up to date. PHP is not just I/O, as everyone thinks (although it is used in most cases). Even in the next versions, we will have the implementation of JIT for applications that require more CPU processing. In addition, we have excellent framewoks and patterns to assist us in development.

 

What is the hatred toward PHP? I’ve never heard good things

 

1 Yes, I still use and I will continue using it

  1. Absolutely. It's easy to get started, there are lots of resources available
  2. It is by far the most used programming language for websites and it will continue dominate the web.

Since the introduction of PHP 7, a lot of things have improved.
PHP is a powerful (7.x), robust and scalable language.
It is a very commonly used programming language so its powerful enough to run most of the big CMS platforms like Wordpress, Joomla, Drupal, etc. and frameworks like Laravel, Symfony etc. It's not the most efficient, nor the fastest. Just pick the right tool for the right job

 

We still have banks running on COBOL systems... At the moment PHP runs a good half of the entire Internet, and you REALLY think it will vanish in a few years? :-)

 

I think because after a period of time only legacy software will be remaining, so undoubtedly the demand will go down

 

Laravel, Lumen and Symfony are perfect but

1 ) I don't use.
2) I recommend Java, Kotlin.
3) @Relof Jan Elsinga +1

 
  1. Only if needed
  2. Only if asked explicitly
  3. Death by Oblivion
 

PHP definitely isn't the behemoth it once was, but I imagine developers will still use PHP even if no-one works out the Node / JavaScript stack was a terrible idea. ;)

 
  1. Nope.
  2. Nope. If they have spare time maybe, but just to have a basic knowledge if they need to deal with some legacy 💩.
  3. Legacy maintenance.
 
  1. I am relearning PHP after nearly seven years of only doing frontend.
  2. It depends on what they want to do.
  3. I am really excited to see what PHP 8 looks like.
 

I think you should adjust the "except for WordPress" part to "except for WordPress and MediaWiki"

 

Just realized MediaWiki uses PHP, thank you. I will update it.

 

Php is a great disaster, but I use it every day!
It's an ugly language full of craps from anywhere, but also best choice for me to do my projects for cheap and speed.

 
  1. Yes, in my 30-50% of daily work with code. Mainly in creating new features
  2. Yes and no. It depends of interests, technology and general area of development, but I think that Java and C# can better describe the principles of OOP and can be more helpful to understand some pattern rules. In my opinion PHP is also good for entry-level programmers. Of course I would change my mind to fully recommend PHP if changes from below would be in PHP.
  3. Threads (pthreads), event-driven(swoole) and more similarities to Java and C#, because they are battle tested in that fields, so PHP can absorb them.
Classic DEV Post from Aug 6 '19

What to put in your portfolio as a beginner web dev

mayank joshi profile image
I love system design and most of the time I find myself learning or designing one of them.